unix shell script loop concept
Hi Friends ,
I have a file called LOG_FILE.lst and having saple data as below
177,PARE0120_30092009_182957.log
511,PARE0120_30092009_012001.log
171,PARE0120_30092009_181551.log
507,PARE0120_30092009_020915.log
i want to capture read the whole file and want to capture the fisrt ,separate filed in a variable called job_id .
I user the below code but its not working ..
for i in $(cat LOG_FILE.lst)
do
job_id = `echo $i |awk -F"," '{print $1}'`
echo "$job_id"
done
when I am printing the job_id as echo "$job_id"
it prints nothing .
Could you suggest what is wrong in the code .
|