Skip to content

Instantly share code, notes, and snippets.

@Inkimar
Created September 4, 2017 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Inkimar/446cb54f0c61a1fc1d50ed03cf03f3ab to your computer and use it in GitHub Desktop.
Save Inkimar/446cb54f0c61a1fc1d50ed03cf03f3ab to your computer and use it in GitHub Desktop.
bash script fetching data from a csv-file
file : users.csv ( put that file in .gitignore)
users.csv
user,password
gpg -c users.csv generates users.csv.gpg -> push to github
run script
#!/bin/bash
while IFS=, read user password
do
echo "I got:$user and $password"
done < users.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment