The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 03-06-2009
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,777
/etc/ is a directory; hosts is a filename.
Code:
ls /etc/hosts
ls -l /etc/hosts
cd /etc
ls hosts
ls -l hosts
Try that.

Code:
if [  < pretend syntax> some test returns true ] ; then
     < do something >
else
     < do a different thing >
fi
fi marks the end of an if statement.

so, "exit 0 fi" is only part of an if block.

exit 0 - means end with success
exit 1 - means end with failure - the 1 can be other non-zero numbers