I have a file,
abc.txt, like this on a Linux machine:
abc|yes|50c|1|pending bcd|no|100c|1|pending cde|yes|45c|2|pending def|no|44c|2|pending
I have split this file into two files based on the 4th field.
If the second field is 'yes' I want to call a script with the 3rd field as a parameter, or if the second field is 'no' the 1st field as a parameter, and run the scripts in parallel. 1.txt should run, then 2.txt and if any script fails it should update the last field from pending to FAILED/SUCCESS.(my scripts passes 0-success,1-failed return code)
ksh script1.ksh 50c ksh script1.ksh bcd
ksh script1.ksh 45c ksh script1.ksh def