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


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: #!shell Chapter 4
The Bourne Shell and Korn Shell
Next: Reference: .
 

:



:

Null command. Returns an exit status of 0. Sometimes used as the first character in a file to denote a Bourne shell script. See example below and under case . In the Korn shell, shell variables can be placed after the : to expand them to their values.

Example

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"
fi


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

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