Flylib.com
UNIX Shells by Example (4th Edition)
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors:
Ellie Quigley
BUY ON AMAZON
UNIX Shells by Example Fourth Edition
Table of Contents
Copyright
Preface
ACKNOWLEDGMENTS
Chapter 1. Introduction to UNIXLinux Shells
1.1. What Is UNIX? What Is Linux? A Little History
1.2. Definition and Function of a Shell
1.3. History of the Shell
1.4. System Startup and the Login Shell
1.5. Processes and the Shell
1.6. The Environment and Inheritance
1.7. Executing Commands from Scripts
Chapter 2. Shell Programming QuickStart
2.1. Taking a Peek at Shell Scripts
2.2. Sample Scripts: Comparing the Major Shells
2.3. The C and TC Shell Syntax and Constructs
2.4. The Bourne Shell Syntax and Constructs
2.5. The Korn Shell Constructs
2.6. The Bash Shell Constructs
Chapter 3. Regular Expressions and Pattern Matching
3.1. Regular Expressions
3.2. Combining Regular Expression Metacharacters
Chapter 4. The grep Family
4.1. The grep Command
4.2. grep Examples with Regular Expressions
4.3. grep with Options
4.4. grep with Pipes
4.5. egrep (Extended grep)
4.6. fgrep (Fixed grep or Fast grep)
4.7. Linux and GNU grep
4.8. GNU Basic grep (grep -G) with Regular Expressions
4.9. grep -E or egrep (GNU Extended grep)
4.10. Fixed grep (grep -F and fgrep)
4.11. Recursive grep (rgrep, grep -R)
4.12. GNU grep with Options
4.13. grep with Options (UNIX and GNU)
LAB 1: grep EXERCISE
Chapter 5. sed, the Streamlined Editor
5.1. What Is sed ?
5.2. Versions of sed
5.3. How Does sed Work?
5.4. Regular Expressions
5.5. Addressing
5.6. Commands and Options
5.7. Error Messages and Exit Status
5.8. Metacharacters
5.9. sed Examples
5.10. sed Scripting
LAB 2: sed EXERCISE
Chapter 6. The awk Utility
6.1. What s awk? What s nawk? What s gawk?
6.2. awk s Format
6.3. How awk Works
6.4. Formatting Output
6.5. awk Commands from Within a File
6.6. Records and Fields
6.7. Patterns and Actions
6.8. Regular Expressions
6.9. awk Commands in a Script File
6.10. Review
LAB 3: awk EXERCISE
6.11. Comparison Expressions
6.12. Review
LAB 4: awk EXERCISE
6.13. Variables
6.14. Redirection and Pipes
6.15. Pipes
6.16. Review
LAB 5: nawk EXERCISE
6.17. Conditional Statements
6.18. Loops
6.19. Program Control Statements
6.20. Arrays
6.21. awk Built-In Functions
6.22. Built-In Arithmetic Functions
6.23. User-Defined Functions (nawk)
6.24. Review
LAB 6: nawk EXERCISE
6.25. Odds and Ends
LAB 7: nawk EXERCISE
6.26. awk Built-In Functions
Chapter 7. The Interactiven Bourne Shell
7.1. Introduction
7.2. The Environment
7.3. The Command Line
7.4. Shell Metacharacters (Wildcards)
7.5. Filename Substitution
7.6. Variables
7.7. Quoting
7.8. Command Substitution
7.9. An Introduction to Functions
7.10. Standard IO and Redirection
7.11. Pipes
7.12. The here document and Input
Chapter 8. Programming the Bourne Shell
8.1. Introduction
8.2. Reading User Input
8.3. Arithmetic
8.4. Positional Parameters and Command-Line Arguments
8.5. Conditional Constructs and Flow Control
8.6. Looping Commands
8.7. Functions
8.8. Trapping Signals
8.9. The Command Line
8.10. Shell Invocation Options
LAB 8: BOURNE SHELL-GETTING STARTED
LAB 9: METACHARACTERS
LAB 10: REDIRECTION
LAB 11: FIRST SCRIPT
LAB 12: COMMAND-LINE ARGUMENTS
LAB 13: GETTING USER INPUT
LAB 14: CONDITIONAL STATEMENTS
LAB 15: CONDITIONALS AND FILE TESTING
LAB 16: THE case STATEMENT
LAB 17: LOOPS
LAB 18: FUNCTIONS
Chapter 9. The Interactive C and TC Shells
9.1. Introduction
9.2. The Environment
9.3. The CTC Shell Command Line
9.4. Aliases
9.5. Manipulating the Directory Stack
9.6. Job Control
9.7. Shell Metacharacters
9.8. Filename Substitution
9.9. Redirection and Pipes
9.10. Variables
9.11. Command Substitution
9.12. Quoting
9.13. New Features of the Interactive TC Shell
9.14. The TC Shell Command Line
9.15. TC Shell Command, Filename, and Variable Completion
9.16. TC Shell Spelling Correction
9.17. TC Shell Aliases
9.18. TC Shell Job Control
9.19. Printing the Values of Variables in the TC Shell
9.20. TC Shell Built-In Commands
LAB 19: THE TC SHELL-GETTING STARTED
LAB 20: HISTORY
LAB 21: SHELL METACHARACTERS
LAB 22: REDIRECTION
LAB 23: VARIABLES AND ARRAYS
Chapter 10. Programming the C and TC Shells
10.1. Introduction
10.2. Reading User Input
10.3. Arithmetic
10.4. Debugging Scripts
10.5. Command-Line Arguments
10.6. Conditional Constructs and Flow Control
10.7. Looping Commands
10.8. Interrupt Handling
10.9. setuid Scripts
10.10. Storing Scripts
10.11. Built-In Commands
LAB 24: CTC SHELLS-GETTING STARTED
LAB 25: SHELL METACHARACTERS
LAB 26: REDIRECTION
LAB 27: FIRST SCRIPT
LAB 28: GETTING USER INPUT
LAB 29: COMMAND-LINE ARGUMENTS
LAB 30: CONDITIONALS AND FILE TESTING
LAB 31: THE switch STATEMENT
LAB 32: LOOPS
Chapter 11. The Interactive Korn Shell
11.1. Introduction
11.2. The Environment
11.3. The Command Line
11.4. Commenting and Filename Expansion
11.5. Aliases
11.6. Job Control
11.7. Metacharacters
11.8. Filename Substitution (Wildcards)
11.9. Variables
11.10. Quoting
11.11. Command Substitution
11.12. Functions
11.13. Standard IO and Redirection
11.14. Pipes
11.15. Timing Commands
Chapter 12. Programming the Korn Shell
12.1. Introduction
12.2. Reading User Input
12.3. Arithmetic
12.4. Positional Parameters and Command-Line Arguments
12.5. Conditional Constructs and Flow Control
12.6. Looping Commands
12.7. Arrays
12.8. Functions
12.9. Trapping Signals
12.10. Coprocesses
12.11. Debugging
12.12. The Command Line
12.13. Security
12.14. Built-In Commands
12.15. Korn Shell Invocation Arguments
LAB 33: KORN SHELL-GETTING STARTED
LAB 34: HISTORY
LAB 35: ALIASES AND FUNCTIONS
LAB 36: SHELL METACHARACTERS
LAB 37: TILDE EXPANSION, QUOTES, AND COMMAND SUBSTITUTION
LAB 38: REDIRECTION
LAB 39: JOB CONTROL
LAB 40: WRITING THE info SHELL SCRIPT
LAB 41: VARIABLE EXPANSION OF SUBSTRINGS
LAB 42: THE lookup SCRIPT
LAB 43: USING typeset
LAB 44: THE ifelse CONSTRUCT AND THE let COMMAND
LAB 45: THE case STATEMENT
LAB 46: THE select LOOP
LAB 47: AUTOLOADING FUNCTIONS
Chapter 13. The Interactive Bash Shell
13.1. Introduction
13.2. The Environment
13.3. The Command Line
13.4. Job Control
13.5. Command-Line Shortcuts
13.6. Aliases
13.7. Manipulating the Directory Stack
13.8. Metacharacters (Wildcards)
13.9. Filename Substitution (Globbing)
13.10. Variables
13.11. Quoting
13.12. Command Substitution
13.13. Arithmetic Expansion
13.14. Order of Expansion
13.15. Arrays
13.16. Functions
13.17. Standard IO and Redirection
13.18. Pipes
13.19. Shell Invocation Options
13.20. Shell Built-In Commands
LAB 48: bash SHELL-GETTING STARTED
LAB 49: JOB CONTROL
LAB 50: COMMAND COMPLETION, HISTORY, AND ALIASES
LAB 51: SHELL METACHARACTERS
LAB 52: REDIRECTION
LAB 53: VARIABLES
Chapter 14. Programming the Bash Shell
14.1. Introduction
14.2. Reading User Input
14.3. Arithmetic
14.4. Positional Parameters and Command-Line Arguments
14.5. Conditional Constructs and Flow Control
14.6. Looping Commands
14.7. Functions
14.8. Trapping Signals
14.9. Debugging
14.10. The Command Line
14.11. bash Options
14.12. Shell Built-In Commands
LAB 54: bash SHELL-FIRST SCRIPT
LAB 55: COMMAND-LINE ARGUMENTS
LAB 56: GETTING USER INPUT
LAB 57: CONDITIONAL STATEMENTS
LAB 58: CONDITIONALS AND FILE TESTING
LAB 59: THE case STATEMENT
LAB 60: LOOPS
LAB 61: FUNCTIONS
Chapter 15. Debugging Shell Scripts
15.1. Introduction
15.2. Style Issues
15.3. Types of Errors
15.4. Probable Causes for Syntax Errors
15.5. Tracing with Shell Options and the set Command
15.6. Summary
Chapter 16. The System Administrator and the Shell
16.1. Introduction
16.2. The Superuser
16.3. Becoming a Superuser with the su Command
16.4. Boot Scripts
16.5. Summary
Appendix A. Useful UNIXLinux Utilities for Shell Programmers
apropos-searches the whatis database for strings
arch-prints the machine architecture (see uname -m)
at, batch-executes commands at a later time
awk-pattern scanning and processing language
banner-makes posters
basename-with a directory name delivers portions of the pathname
bash-GNU Bourne Again Shell
bc-processes precision arithmetic
bdiff-compares two big files
cal-displays a calendar
cat-concatenates and displays files
chfn-changes the finger information
chmod-changes the permissions mode of a file
chown-changes owner of file
chsh-changes your login shell
clear-clears the terminal screen
cmp-compares two files
compress-compress, uncompress, zcat compress, uncompress files, or display expanded files
cp-copies files
cpio-copies 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
dd-converts a file while copying it
diff-compares two files for differences
dos, xdos, dosexec, dosdebug-a Linux DOS emulator that runs MS-DOS and MS-DOS programs under Linux
df-summarizes free disk space
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-searches 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
free-displays amount of free and used memory in the system
fuser-identifies processes using files or sockets
gawk-pattern scanning and processing language
gcc, g-GNU project C and C Compiler (v2.7)
getopt(s)-parses command-line options
grep-searches a file for a pattern
groups-prints group membership of user
gzip, gunzip, zcat-compresses or expands files
head-outputs the first ten lines of a file(s)
host-prints information about specified hosts or zones in DNS
id-prints the username, user ID, group name, and group ID
jsh-the standard, job control shell
kill-sends a signal to terminate one or more processes
killall-kills processes by name
less-opposite of more
line-reads one line
ln-creates hard links to files
logname-gets the name of the user running the process
look-displays lines beginning with a given string
lp-sends output to a printer (ATT)
lpr-sends output to a printer (UCB)
lpstat-prints information about the status of the LP print service (ATT)
lpq-prints information about the status of the printer (UCB)
ls-lists contents of directory
mail, rmail-reads mail or sends mail to users
mailx-interactive message processing system
make-maintains, updates, and regenerates groups of related programs and files
man-formats and displays the online manual pages
manpath-determines user s search path for man pages
mesg-permits or denies messages resulting from the write command
mkdir-creates a directory
more-browses or pages through a text file
mtools-utilities to access DOS disks in UNIX
mv-moves or renames files
nawk-pattern scanning and processing language
newgrp-logs into 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, 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)
pine-a Program for Internet News and E-mail
pg-displays files one page at a time
pr-prints files
ping-reports if a remote system is reachable and alive
ps-reports process status
pstree-displays a tree of processes
pwd-displays the present working directory name
quota-displays users disk usage and limits
rcp-remote file copy
rdate-gets the date and time via the network
rgrep-a recursive, highlighting grep program
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-sorts andor merges 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-sets 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
top-displays top CPU processes
touch-updates access time andor modification time of a file
tput-initializes a terminal or queries the terminfo database
tr-translates characters
true-provides 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-copies files to another system, UNIX-to-UNIX system copy
uuencode, uudecode-encodes a binary file into ASCII text in order to send it through e-mail, or converts 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-uncompresses a compressed file to standard output
zipinfo-lists detailed information about a ZIP archive
zmore-file perusal filter for crt viewing of compressed text
Appendix B. Comparison of the Shells
B.1. The Shells Compared
B.2. tcsh versus csh
B.3. bash versus sh
CD-ROM Warranty
About the CD-ROM
Index
index_SYMBOL
index_A
index_B
index_C
index_D
index_E
index_F
index_G
index_H
index_I
index_J
index_K
index_L
index_M
index_N
index_O
index_P
index_Q
index_R
index_S
index_T
index_U
index_V
index_W
index_X
index_Y
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors:
Ellie Quigley
BUY ON AMAZON
Oracle Developer Forms Techniques
GUI Development
Special Tips for List Items
Obtaining Query Count Without EXECUTE-ing a Query
Summary
Normal Trigger Intelligence
Cisco IP Telephony (CIPT) (Authorized Self-Study) (2nd Edition)
Cisco CallManager User Configuration
Partitions and Calling Search Spaces Overview
Configuring User Features, Part 2
Using FAC and CMC
PKI Enrollment
101 Microsoft Visual Basic .NET Applications
Data Access
Building Windows Forms User Interfaces
Working with the .NET Framework
GDI+
Coding Conventions
Persuasive Technology: Using Computers to Change What We Think and Do (Interactive Technologies)
Overview of Captology
The Functional Triad Computers in Persuasive Roles
Computers as Persuasive Tools
Credibility and Computers
Captology Looking Forward
Ruby Cookbook (Cookbooks (OReilly))
Summing the Items of an Array
Getting a Human-Readable Printout of Any Object
Parsing Invalid Markup
Handling File Uploads via CGI
Automatically Generating Documentation
Comparing, Designing, and Deploying VPNs
What Is a Virtual Private Network?
Designing and Implementing L2TPv2 and L2TPv3 Remote Access VPNs
Designing and Implementing L2TP Compulsory/NAS-Initiated Tunnel Mode Remote Access VPNs
Summary
Implementing Full Network Access Using the Cisco SSL VPN Client
flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net
Privacy policy
This website uses cookies. Click
here
to find out more.
Accept cookies