I have a text file having multiple rows. I am using the while command to read the file line-wise but I need to store the values in separate variables and use them in the trailing shell-script.
The cut command delimits the complete file not the read line.
I am using the below while loop to read the file line-wise
while IFS= read -r line; do jobid=`cut -d: -f2` id=`cut -d: -f1` #remaining shell-script dependent upon variables# done < my_file.txt
I want to store the jobid and id for every line in
my_file.txt and run the trailing script. Each line is in a new line
Need help to store the values in the variables recursively. If there is a better way to read line wise and delimit and store the two fields separately.