The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-30-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,991
forward the output of the df -k command to /dev/null and ask for the exit status of the command...


Code:
df -k | grep test | grep -v grep > /dev/null
echo $?

the output should be a "1" or "0" depending if "test" is present!