What we want to accomplish. Have one source file (data.csv) to be referenced with the following data:
userone,password1
usertwo,password2
userthree,password3
Use the source file to find a username and then provide the password after the comma as another variable. Example
Variables:
User1=userone
User1Password=password1
#!/usr/bin/env bash
source data.csv
read data.csv
If $User1=userone
then
$User1Password=password1
- We are using this to create a local user account on a Mac with a different line of code but need to reference a .csv file to get the variables.
Thanks in advance for any support.