Created
March 14, 2022 18:24
-
-
Save nerun/0c4b09d9877d0dc39ffde3f6226c581e to your computer and use it in GitHub Desktop.
Convert a CSV created by Bitwarden Password Manager to Chrome CSV format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First, make a copy of the original CSV file. We gonna work with the copy. | |
cp $1 $2 | |
# If no name is given for the output file, use a default. | |
if [ -z $2 ]; then | |
output='passwords_output.csv' | |
else | |
output=$2 | |
fi | |
# DO THE CHANGES, they are so easy!!! | |
# login_uri >>>>>>>> url | |
grep -rl 'login_uri' $output | xargs -i@ sed -i s/login_uri/url/g @ | |
# login_username >>> username | |
grep -rl 'login_username' $output | xargs -i@ sed -i s/login_username/username/g @ | |
# login_password >>> password | |
grep -rl 'login_password' $output | xargs -i@ sed -i s/login_password/password/g @ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment