Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: #!shellChapter 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: #!shellUNIX in a Nutshell: System V EditionNext: Reference: .
Reference: #!shellBook IndexReference: .

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