I have below SH script which reads test.csv file but it is not printing command what I am expecting. Please help
read header
while IFS="," read -r user role
do
echo "btp assign security_role-collection $role --to-user $user"
done
} < test.csv
test.csv file records as below
user,role
[email protected],testrole1
[email protected],testrole2
Results what I am getting is:
--to-user [email protected] testrole1
--to-user [email protected] testrole2
btp assign security_role-collection --to-user
but I am expecting below results instead. What am I doing wrong ?
btp assign security_role-collection testrole1 --to-user [email protected]
btp assign security_role-collection testrole2 --to-user [email protected]