The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
How to get exit code in a pipe-lined command?
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to get exit code in a pipe-lined command?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
01-10-2008
V3l0
Registered User
Join Date: Nov 2007
Location: Belgium & France
Posts: 70
Code:
res=$(grep abc dddd) if [[ $? -ne 0 ]] then echo "ERROR!" else echo $res >> log fi
V3l0
View Public Profile
Find all posts by V3l0
Find V3l0's past nominations received
Find V3l0's present nominations given