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


! pipeline

ksh93 only. Negate the sense of a pipeline. Returns an exit status of 0 if the pipeline exited nonzero, and an exit status of 1 if the pipeline exited zero. Typically used in if and while statements.


This code prints a message if user jane is not logged on:

if ! who | grep jane > /dev/null
	echo jane is not currently logged on

Previous: 4.9 Built-in Commands (Bourne and Korn Shells) UNIX in a Nutshell: System V Edition Next: Reference: #
4.9 Built-in Commands (Bourne and Korn Shells) 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