O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example Commands

# Execute multiple commands on one line

					$ pwd ; ls tmp ; print "Hello world"
				

# Run the find command in the background

					$ find . —name tmp.out —print &
				

# Connect the output of who to grep

					$ who | grep fred
				

# Talk to fred if he is logged on

					$ {who | grep fred ;} && talk fred
				

# Send ls output to ls.out, even if noclobber is set

					$ ls >| ls.out
				

# Append output of ls to ls.out

					$ ls >> ls.out
				

# Send invite.txt to dick, jane, and spot

					$ mail dick jane spot < invite.txt
				

# List file names that begin with z

					$ ls z*
				

# List two, three, and four character file names

					$ ls ?? ??? ????
				

# List file names that begin with a, b, or c

					$ ls [a-c]*
				

# List file names that do not end with.c

					$ ls *[!.c]
				

# List file names that contain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required