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 ...
Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.