Thread: exit status

View Single Post
  #8 (permalink)  
Old 1st September 2005, 04:01 PM
ricc ricc is offline
Member
 
Join Date: Jul 2005
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ricc
Default

Thats good--- . Thank you Sweta.

One more thing....

Lets say....

we have something within a "for" script loop.. like:

Code:
for i in $(cat file.txt | awk ' { print $1 }'| grep -vE "( xyz|abc|^-)")
do  command 1
     command 2 
     command 3
done
and if any of the commands within (cat file.txt | awk ' { print $1 }'| grep -vE "( xyz|abc|^-)") fails, can we get an exit status of that.

can we....?. I guess when we run something within () , it spawns another sub-shell for that.

Thanks everyone...monk,rocky,vivek,sweta...everyone, for all of your unstinted support and replies.

Cheers,
rc
Reply With Quote