Fixed conversion for password with escape character using TAB delimiter
This commit is contained in:
parent
266861d2b0
commit
314b3795de
1 changed files with 3 additions and 2 deletions
|
@ -15,13 +15,14 @@ fi
|
|||
BASE_NAME=passwords
|
||||
CURRENT_DATE=$(date "+%Y-%m-%d")
|
||||
FINAL_FILE_NAME=${BASE_NAME}_${CURRENT_DATE}.csv
|
||||
DELIMITER=$'\t'
|
||||
|
||||
if [[ -f "$FINAL_FILE_NAME" ]]; then
|
||||
echo "A file with name $FINAL_FILE_NAME already exists! Please rename or delete and re-execute this script."
|
||||
exit
|
||||
else
|
||||
touch $FINAL_FILE_NAME
|
||||
echo "\"Account\";\"Password\";\"Login\"" >> $FINAL_FILE_NAME
|
||||
echo "Account${DELIMITER}Password${DELIMITER}Login" >> $FINAL_FILE_NAME
|
||||
fi
|
||||
|
||||
if [[ -f "$FINAL_FILE_NAME" ]]; then
|
||||
|
@ -36,7 +37,7 @@ if [[ -f "$FINAL_FILE_NAME" ]]; then
|
|||
GPG_FILE_NAME=${GPG_FILE_NAME//\// > }
|
||||
|
||||
echo "Processing ${GPG_FILE_NAME}";
|
||||
echo "\"$GPG_FILE_NAME\";\"$PASSWORD\";\"$LOGIN_KEY\"" >> $FINAL_FILE_NAME
|
||||
echo "$GPG_FILE_NAME$DELIMITER$PASSWORD$DELIMITER$LOGIN_KEY" >> $FINAL_FILE_NAME
|
||||
}; done;
|
||||
unset f;
|
||||
|
||||
|
|
Loading…
Reference in a new issue