From the command line I can run a python script with some arguments and all is well.
The problem I have is I'm trying to run this script (an a couple of others) many times using a bash scrip which reads the arguments each time from a CSV file. The arguments include "account" which is a domain name, "password1" & "password2" which are passwords that may include special characters.
This is my script to far:
#!/bin/bash
INPUT=accountlist.csv
OLDIFS=$IFS
IFS=,
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read -r account $password1 $password2
do
/tmp/migration_imapcopy $account $password1 $password2
/tmp/migration_markmigrated $account
/tmp/migration_dnscheck abel $account
/tmp/migration_imapcopy $account $password1 $password2
done < $INPUT
IFS=$OLDIFS
My problem is when I run this script, the output from the various python scripts (those using the password variables) suggests that their is a problem logging in, i.e. the password variables are not correct.
It's almost as if the arguments aren't being supplied correctly each time.
Can anyone shed some light?
"$account"abelpassandentapassinread, yet$password1and$password2in the body of the while loop. Are those typo, or are they actually in your script?