home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  



Null command. Returns an exit status of 0. Sometimes used on older systems as the first character in a file to denote a Bourne shell script. See this Example and under case . The line is still processed for side effects, such as variable and command substitutions.


Check whether someone is logged in:

if who | grep $1 > /dev/null
then :	 # Do nothing if pattern is found
else echo "User $1 is not logged in"

Previous: Reference: #!shell UNIX in a Nutshell: System V Edition Next: Reference: .
Reference: #!shell Book Index Reference: .

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System