diff --git a/convert_to_csv.sh b/convert_to_csv.sh index a8d34b9..89fba66 100755 --- a/convert_to_csv.sh +++ b/convert_to_csv.sh @@ -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;