Book description
Five UNIX shells, three essential utilities, one indispensable resource!
Learn UNIX shell programming the easy way, using hands-on examples
Covers all five leading UNIX shells-C, Bourne, Korn, bash, and tcsh
By best-selling author Ellie Quigley, Silicon Valley's top UNIX instructor
The best-selling UNIX Shells by Example continues to be the only book you need to learn UNIX shell programming. UNIX Shells by Example, Third Edition adds thorough coverage of the new bash and tcsh shells to the full explanations in Quigley's famous treatment of the C, Bourne, and Korn shells and the awk, sed, and grep utilities, making this the most complete UNIX shell programming book available anywhere. Using proven techniques drawn from her acclaimed Silicon Valley UNIX classes, Quigley transforms you into an expert-level shell programmer. You'll learn what the shells are, what they do, and how to program them, as well as how and when to use awk, sed, and grep. Code examples, completely revised and classroom-tested for this edition, explain concepts first-hand and can serve as the basis for your own projects.
Explains the C, Bourne, Korn, bash, and tcsh shells in one cohesive way-you'll understand which shell to use and why
Details the essential awk, sed, and grep programming utilities
Offers proven teaching methods from a top UNIX shell instructor
Provides source code and data files for all examples on the CD-ROM, so you can experiment with them on your own system
UNIX system administrators, application developers, and power users will turn to this book again and again, both as a vital classroom learning tool and as a favorite reference manual.
About the CD-ROM
Provides source code and data files for all examples in the book!
Table of contents
- Copyright
- Preface
- Introduction to UNIX Shells
- The UNIX Toolbox
- The grep Family
- sed, the Streamlined Editor
- The awk Utility: awk as a UNIX Tool
- The awk Utility: awk Programming Constructs
-
The awk Utility: awk Programming
- Variables
- Redirection and Pipes
- Pipes
- Closing Files and Pipes
- Review
- UNIX TOOLS LAB EXERCISE
- Conditional Statements
- Loops
- Program Control Statements
- Arrays
- awk Built-In Functions
- Built-In Arithmetic Functions
- User-Defined Functions (nawk)
- Review
- UNIX TOOLS LAB EXERCISE
- Odds and Ends
- Review
- UNIX TOOLS LAB EXERCISE
- The Interactive Bourne Shell
- The C Shell
- The Korn Shell
- The Interactive bash Shell
-
Programming with the bash Shell
- Introduction
- Reading User Input
- Arithmetic
- Positional Parameters and Command Line Arguments
- Conditional Constructs and Flow Control
- Looping Commands
- Functions
- Trapping Signals
- Debugging
- Processing Command Line Options with getopts
- The eval Command and Parsing the Command Line
- bash Options
- Shell Built-In Commands
- BASH SHELL LAB EXERCISES
- The Interactive TC Shell
-
Useful UNIX Utilities for Shell Programmers
- at—at, batch—execute commands at a later time
- awk—pattern scanning and processing language
- banner—make posters
- basename—with a directory name delivers portions of the pathname
- bc—processes precision arithmetic
- bdiff—compares two big files
- cal—displays a calendar
- cat—concatenates and displays files
- chmod—change the permissions mode of a file
- chown—changes owner of file
- clear—clears the terminal screen
- cmp—compares two files
- compress—compress, uncompress, zcat compress, uncompress files, or display expanded files
- cp—copies files
- cpio—copy file archives in and out
- cron—the clock daemon
- crypt—encodes or decodes a file
- cut—removes selected fields or characters from each line of a file
- date—displays the date and time or sets the date
- diff—compares two files for differences diff [–bitw] [–c | –Cn
- du—summarizes disk usage
- echo—echoes arguments
- egrep—searches a file for a pattern using full regular expressions
- expr—evaluates arguments as an expression
- fgrep—search a file for a character string
- file—determines the type of a file by looking at its contents
- find—finds files
- finger—displays information about local and remote users
- fmt—simple text formatters
- fold—folds long lines
- ftp—file transfer program
- getopt(s)—parses command line options
- grep—searches a file for a pattern
- groups—prints group membership of user
- id—prints the username, user ID, group name and group ID
- jsh—the standard, job control shell
- line—reads one line
- logname—gets the name of the user running the process
- lp—sends output to a printer (AT&T)
- lpr—sends output to a printer (UCB)
- lpstat—print information about the status of the LP print service (AT&T)
- lpq—print information about the status of the printer (UCB)
- ls—lists contents of directory
- mail—mail, rmail—read mail or send mail to users
- mailx—interactive message processing system
- make—maintains, updates, and regenerates groups of related programs and files
- mesg—permits or denies messages resulting from the write command
- mkdir—creates a directory
- more—browse or page through a text file
- mv—move or rename files
- nawk—pattern scanning and processing language
- newgrp—log in to a new group
- news—prints news items
- nice—runs a command at low priority
- nohup—makes commands immune to hangups and quits
- od—octal dump
- pack—pack, pcat, unpack—compresses and expands files
- passwd—changes the login password and password attributes
- paste—merges same lines of several files or subsequent lines of one file
- pcat—(see pack)
- pg—displays files a page at a time
- pr—prints files
- ps—reports process status
- pwd—displays the present working directory name
- rcp—remote file copy
- rlogin—remote login
- rm—removes files from directories
- rmdir—removes a directory
- rsh—starts a remote shell
- ruptime—shows the host status of local machines
- rwho—who is logged in on local machines
- script—creates a typescript of a terminal session
- sed—streamlined editor
- size—prints section sizes in bytes of object files
- sleep—suspends execution for some number of seconds
- sort—sort and/or merge files
- spell—finds spelling errors
- split—splits a file into pieces
- strings—finds any printable strings in an object or binary file
- stty—sets the options for a terminal
- su—become superuser or another user
- sum—calculates a checksum for a file
- sync—updates the superblock and sends changed blocks to disk
- tabs—set tab stops on a terminal
- tail—displays the tail end of a file.
- talk—allows you to talk to another user
- tar—stores and retrieves files from an archive file, normally a tape device
- tee—replicates the standard output
- telnet—communicates with a remote host
- test—evaluates an expression
- time—displays a summary of time used by this shell and its children
- timex—times a command; reports process data and system activity
- touch—updates access time and/or modification time of a file
- tput—initializes a terminal or queries the terminfo database
- tr—translates characters
- true—provide successful exit status
- tsort —topological sort
- tty—gets the name of the terminal
- umask—sets file-creation mode mask for permissions
- uname—prints name of current machine
- uncompress—restores files to their original state after they have been compressed using the compress command
- uniq—reports on duplicate lines in a file
- units—converts quantities expressed in standard scales to other scales
- unpack—expands files created by pack
- uucp—copy files to another system, UNIX-to-UNIX system copy
- uuencode—uuencode, uudecode—encode a binary file into ASCII text in order to send it through e-mail, or convert it back into its original form
- wc—counts lines, words, and characters
- what—extracts SCCS version information from a file by printing information found after the @(#) pattern
- which—locates a command and displays its pathname or alias (UCB)
- whereis—locates the binary, source, and manual page files for a command (UCB)
- who—displays who is logged on the system
- write—writes a message to another user
- xargs—constructs an argument list(s) and executes a command
- zcat—uncompress a compressed file to standard output. Same as uncompress –c
- Comparison of the Shells
- Steps for Using Quoting Correctly
Product information
- Title: UNIX® Shells by Example, Third Edition
- Author(s):
- Release date: October 2001
- Publisher(s): Pearson
- ISBN: 9780130665386
You might also like
book
UNIX® Shells by Example Fourth Edition
The world’s #1 shell programming book—now fully updated for Linux and more! UNIX Shells by Example …
book
The High-Potential Leader
Companies need High Potential leaders (Hi-Po’s) more than ever before to help them adapt to todays …
book
UNIX® User’s Handbook, Second Edition
The in-depth UNIX guide for every end-user: completely updated and full of examples! For every key …
book
Storage Area Networks For Dummies®
If you’ve been charged with setting up storage area networks for your company, learning how SANs …