Hi
I have a job status csv file. I want to update the status of the job in the file.
Below is the csv file
1,jobname1,in_progress,starttime,somthing,somthing
2,jobname2,completed,starttime,somthing,somthing
3,jobname3,failed,starttime,somthing,somthing
4,jobname1,not_started,starttime,somthing,somthing
I want to update the status of the job in the file for a pattern "1,jobname1" from in_progress to completed. Basically i want to update the 3rd field value (what ever it may be) of the line which matches the pattern "1,jobname1" with "completed"
ie, after the update the file should look like
1,jobname1,completed,starttime,somthing,somthing
2,jobname2,completed,starttime,somthing,somthing
3,jobname3,failed,starttime,somthing,somthing
4,jobname1,not_started,starttime,somthing,somthing
can I do this with awk ?
Thanks