I'm trying to write a bash script to read a file as input and append the values/data in that file into variables and the values of the variables should be updated each iteration based on the input line from the file.
Eg: Input file looks like below:
100 Thomas Manager Sales $5,000 200 Jason Developer Technology $5,500 300 Sanjay Sysadmin Technology $7,000 400 Nisha Manager Marketing $9,500 500 Randy DBA Technology $6,000
While reading this through my shell script, I'll define 5 variables let's a,b,c,d,e.
The variable values should be assigned with first line of input file.
a=100 b=Thomas c=Manager d=Sales e=$5000
The variable values should be assigned with second line of input file.
a=200 b=Jason c=Developer d=Technology e=$5500
And so on...
Please anyone give some input on how to write a script to read values in this format.