I have a job_list.dat contains say 5 jobs (a b c d e)
if job b failed at first run
I want to produce a re_run.dat only contains 4 jobs (b c d e)
I have written a code below. Can some one show me to do the same thing in awk ?
Here is my code
set -A list $(cat $job_list)
a=0
while [ "$a" -lt ${#list[*]} ]
do
if [ "${list[$a]}" == "$fail_at" ];then
begin=$a
break
fi
(( a+=1 ))
done
echo "match:$begin"
while [ "$begin" -lt ${#list[*]} ]
do
echo ${list[$begin]} > $re_run
(( begin+=1 ))
done
if job b failed at first run
I want to produce a re_run.dat only contains 4 jobs (b c d e)
I have written a code below. Can some one show me to do the same thing in awk ?
Here is my code
set -A list $(cat $job_list)
a=0
while [ "$a" -lt ${#list[*]} ]
do
if [ "${list[$a]}" == "$fail_at" ];then
begin=$a
break
fi
(( a+=1 ))
done
echo "match:$begin"
while [ "$begin" -lt ${#list[*]} ]
do
echo ${list[$begin]} > $re_run
(( begin+=1 ))
done