Download UNIX in a Nutshell PDF

TitleUNIX in a Nutshell
Author
LanguageEnglish
File Size5.9 MB
Total Pages908
Table of Contents
                            Table of Contents
Preface
	Audience
	Scope of This Book
	Conventions
	Using Code Examples
	Safari® Enabled
	How to Contact Us
	Acknowledgments
I
Introduction
	Unix in the 21st Century
	Obtaining Compilers
		Solaris
		GNU/Linux
		Mac OS X
	Building Software
	What’s in the Quick Reference
	Beginner’s Guide
		Communication
		Comparisons
		File Management
		Miscellaneous
		Printing (BSD Commands)
		Printing (System V Commands)
		Programming
		Searching
		Shells
		Shell Programming
		Storage
		System Status
		Text Processing
	Solaris: Standard Compliant Programs
Unix Commands
	Introduction
		Finding Commands on Solaris
		Finding Commands on GNU/Linux and Mac OS X
	Alphabetical Summary of Common Commands
		aclocal
		apropos
		ar
		as
		at
		atq
		atrm
		autoconf
		autoheader
		automake
		awk
		banner
		basename
		bash
		batch
		bc
		biff
		bison
		bzip2
		cal
		calendar
		cancel
		cat
		cc
		cd
		chgrp
		chmod
		chown
		cksum
		clear
		cmp
		comm
		cp
		cpio
		crontab
		csh
		csplit
		ctags
		curl
		cut
		date
		dc
		dd
		df
		diff
		diff3
		dig
		dirname
		dos2unix
		du
		echo
		ed
		egrep
		eject
		emacs
		env
		etags
		evim
		ex
		expand
		expr
		factor
		false
		fdformat
		fgrep
		file
		find
		finger
		flex
		fmt
		ftp
		g++
		gcc
		gcore
		gdb
		getconf
		getopts
		gettext
		ghostscript
		gprof
		grep
		groff
		groups
		gs
		gunzip
		gzcat
		gzip
		head
		hexdump
		hostname
		iconv
		id
		info
		join
		kill
		ksh
		ld
		ldd
		less
		lex
		link
		ln
		locale
		locate
		logger
		login
		logname
		look
		lp
		lpq
		lpr
		lprm
		lpstat
		ls
		m4
		mail
		mailx
		make
		man
		mesg
		mkdir
		mkisofs
		mktemp
		more
		mount
		msgfmt
		mv
		nawk
		nice
		nl
		nm
		nohup
		nroff
		od
		passwd
		paste
		patch
		pathchk
		pax
		perl
		pr
		printenv
		printf
		ps
		pwd
		python
		r Commands
		rcs
		reset
		rm
		rmdir
		rsync
		samba
		scp
		screen
		script
		sdiff
		sed
		sftp
		sh
		size
		sleep
		soelim
		sort
		spell
		split
		ssh
		ssh-add
		ssh-agent
		ssh-keygen
		strings
		strip
		stty
		su
		tail
		talk
		tar
		tcsh
		tee
		telnet
		test
		time
		touch
		tr
		troff
		true
		tset
		tty
		type
		umask
		uname
		umount
		unexpand
		uniq
		units
		unix2dos
		unzip
		uptime
		users
		uudecode
		vi
		view
		vim
		vimdiff
		w
		wait
		wc
		whatis
		which
		who
		whoami
		xargs
		xgettext
		yacc
		zcat
		zip
		zipinfo
	Alphabetical Summary of Solaris Commands
		cde
		cdrw
		chkey
		decrypt
		digest
		dircmp
		dis
		encrypt
		enhance
		filesync
		gpatch
		keylogin
		keylogout
		line
		listusers
		mac
		mount
		nawk
		openwin
		page
		ps
		rksh
		setpgrp
		sotruss
		timex
		truss
		umount
		vacation
		volcheck
		whocalls
	Alphabetical Summary of GNU/Linux Commands
		aspell
		cdda2wav
		cdparanoia
		cdrdao
		cdrecord
		dir
		dircolors
		dvdrecord
		gawk
		gettextize
		igawk
		ispell
		ltrace
		lynx
		mac2unix
		md5sum
		mount
		mutt
		ooffice
		pdksh
		ps
		rename
		seq
		sha1sum
		shred
		skill
		slocate
		splint
		strace
		umount
		watch
		wget
		xmlto
	Alphabetical Summary of Mac OS X Commands
		apply
		chflags
		chfn
		chpass
		chsh
		defaults
		developer
		ditto
		lam
		leave
		mount
		nano
		open-x11
		pbcopy
		pbpaste
		pico
		ps
		pstopdf
		pythonw
		say
		shar
		shlock
		srm
		umount
	Alphabetical Summary of Java Commands
		appletviewer
		apt
		jar
		jarsigner
		java
		javac
		javadoc
		javah
		javap
		jdb
		keytool
		rmic
		rmid
		rmiregistry
The Unix Shell: An Overview
	Introduction to the Shell
	Purpose of the Shell
		Interactive Use
		Customization of Your Unix Session
		Programming
	Shell Flavors
		Which Shell Do I Want?
	Shell Source Code URLs
	Common Features
	Differing Features
The Bash and Korn Shells
	Overview of Features
	Invoking the Shell
		Options
			Common options
			Bash options
		Arguments
	Syntax
		Special Files
		Filename Metacharacters
			Examples
		Quoting
			Examples
		Command Forms
			Examples
		Redirection Forms
			Simple redirection
			Redirection using file descriptors
			Multiple redirection
			Examples
		Coprocesses
			Examples
	Functions
	Variables
		Variable Substitution
			Examples
		Built-in Shell Variables
		Other Shell Variables
		Arrays
		Discipline Functions (ksh93 Only)
		Special Prompt Strings
	Arithmetic Expressions
		Operators
		Built-in Mathematical Functions (ksh93 Only)
		Examples
	Command History
		Line-Edit Mode
			Common editing keystrokes
		The fc and hist Commands
			Examples
		Programmable Completion (Bash Only)
			Examples
	Job Control
	Command Execution
	Restricted Shells
	Built-in Commands (Bash and Korn Shells)
		!
		#
		#!shell
		:
		.
		[[]]
		name()
		alias
		autoload
		bind
		bg
		break
		builtin
		builtin
		caller
		case
		cd
		command
		compgen
		complete
		continue
		declare
		dirs
		disown
		disown
		do
		done
		echo
		echo
		enable
		esac
		eval
		exec
		exit
		export
		false
		fc
		fc
		fg
		fi
		for
		for
		function
		functions
		getconf
		getopts
		hash
		hash
		help
		hist
		history
		history
		if
		integer
		jobs
		kill
		let
		local
		login
		logout
		nameref
		nohup
		popd
		print
		printf
		pwd
		pushd
		r
		read
		readonly
		redirect
		return
		select
		set
		shopt
		shift
		sleep
		source
		stop
		suspend
		test
		time
		times
		times
		trap
		true
		type
		type
		typeset
		ulimit
		umask
		unalias
		unset
		until
		wait
		whence
		while
		filename
tcsh: An Extended C Shell
	Overview of Features
	Invoking the Shell
		Options
		Arguments
	Syntax
		Special Files
		Filename Metacharacters
			Examples
		Quoting
			Examples
		Command Forms
			Examples
		Redirection Forms
			Simple redirection
			Multiple redirection
			Examples
	Variables
		Variable Substitution
			Examples
		Variable Modifiers
			Examples using pathname modifiers
			Examples using quoting modifiers
		Predefined Shell Variables
		Formatting for the Prompt Variable
		Sample .tcshrc File
		Environment Variables
	Expressions
		Operators
			Assignment operators
			Arithmetic operators
			Bitwise and logical operators
			Comparison operators
			File inquiry operators
		Examples
	Command History
		Command Substitution
		Command Substitution Examples
		Word Substitution
		Word Substitution Examples
		History Modifiers
			Printing, substitution, and quoting
			Truncation
		History Modifier Examples
		Special Aliases
			Examples
	Command-Line Manipulation
		Completion
		Related Shell Variables
		Related Command-Line Editor Commands
		Related Shell Built-ins
		Command-Line Editing
			Emacs mode
			vi mode
	Job Control
	Built-in Commands
		@
		#
		#!
		:
		alias
		alloc
		bg
		bindkey
		break
		breaksw
		built-ins
		bye
		case
		cd
		chdir
		complete
		continue
		default
		dirs
		echo
		echotc
		else
		end
		endif
		endsw
		eval
		exec
		exit
		fg
		filetest
		foreach
		glob
		goto
		hashstat
		history
		hup
		if
		jobs
		kill
		limit
		log
		login
		logout
		ls-F
		newgrp
		nice
		nohup
		notify
		onintr
		popd
		printenv
		pushd
		rehash
		repeat
		sched
		set
		setenv
		settc
		setty
		shift
		source
		stop
		suspend
		switch
		telltc
		termname
		time
		umask
		unalias
		uncomplete
		unhash
		unlimit
		unset
		unsetenv
		wait
		watchlog
		where
		which
		while
Package Management
	Linux Package Management
	The Red Hat Package Manager
		RPM Package Concepts
		The rpm Command
			General options
			Install, upgrade, and freshen options
			Query options
			Uninstall options
			Verify options
			Database rebuild options
			Signature check options
			Miscellaneous options
			FTP/HTTP options
		RPM Examples
		The rpmbuild Command
			rpmbuild options
	Yum: Yellowdog Updater Modified
		The yum Command
			General options
		Yum Command Summary
			check-update
			clean
			generate-rss
			groupinfo
			groupinstall
			grouplist
			groupremove
			groupupdate
			info
			install
			list
			localinstall
			localupdate
			makecache
			provides
			remove
			search
			update
			upgrade
			whatprovides
	up2date: Red Hat Update Agent
		Options
	The Debian Package Manager
		Files
		Package Priorities
		Package and Selection States
		Package Flags
		Scripts
		Debian Package Manager Command Summary
			apt-cache
			apt-cdrom
			apt-config
			apt- extracttemplates
			apt-ftparchive
			apt-get
			apt-sortpkgs
			aptitude
			dpkg
			dpkg-deb
			dpkg-query
			dpkg-split
			dselect
			synaptic
	Mac OS X Package Management
		Fink and Fink Commander
		The GNU Mac OS X Public Archive
		Building from Source
	Solaris Package Management
		Solaris Package Management Command Summary
			installf
			pkgadd
			pkgadm
			pkgask
			pkgchk
			pkginfo
			pkgmk
			pkgparam
			pkgproto
			pkgrm
			removef
II
Pattern Matching
	Filenames Versus Patterns
	Metacharacters
		Search Patterns
		Replacement Patterns
	Metacharacters, Listed by Unix Program
	Examples of Searching
		Examples of Searching and Replacing
The Emacs Editor
	Conceptual Overview
		Modes
		Buffer and Window
		Point and Mark
		Kill and Yank
		Notes on the Tables
		Absolutely Essential Commands
	Command-Line Syntax
	Summary of Commands by Group
		File-Handling Commands
		Cursor-Movement Commands
		Deletion Commands
		Paragraphs and Regions
		Stopping and Undoing Commands
		Transposition Commands
		Search Commands
		Capitalization Commands
		Word-Abbreviation Commands
		Buffer-Manipulation Commands
		Window Commands
		Special Shell Characters
		Indentation Commands
		Centering Commands
		Macro Commands
		Basic Indentation Commands
		Detail Information Help Commands
		Help Commands
	Summary of Commands by Key
		Control-Key Sequences
		Meta-Key Sequences
	Summary of Commands by Name
The vi, ex, and vim Editors
	Conceptual Overview
	Command-Line Syntax
		Command-Line Options
	Review of vi Operations
		Command Mode
		Insert Mode
		Syntax of vi Commands
			Examples
			Visual mode (vim only)
		Status-Line Commands
	vi Commands
		Movement Commands
			Character
			Text
			Lines
			Screens
			Searches
			Line numbering
			Marks
		Insert Commands
		Edit Commands
			Changing and deleting text
			Copying and moving
		Saving and Exiting
		Accessing Multiple Files
		Window Commands (vim)
		Interacting with the System
		Macros
		Miscellaneous Commands
	vi Configuration
		The :set Command
		Options Used by :set
		Example .exrc File
	ex Basics
		Syntax of ex Commands
		Addresses
		Address Symbols
		Options
	Alphabetical Summary of ex Commands
		abbreviate
		append
		args
		bdelete
		buffer
		buffers
		cd
		center
		change
		close
		copy
		delete
		edit
		file
		fold
		foldclose
		foldopen
		global
		hide
		insert
		join
		jumps
		k
		left
		list
		map
		mark
		marks
		mkexrc
		move
		new
		next
		nohlsearch
		number
		only
		open
		preserve
		previous
		print
		put
		qall
		quit
		read
		read
		recover
		redo
		resize
		rewind
		right
		sbnext
		sbuffer
		set
		shell
		snext
		source
		split
		sprevious
		stop
		substitute
		suspend
		sview
		t
		tag
		tags
		unabbreviate
		undo
		unhide
		unmap
		v
		version
		view
		visual
		visual
		vsplit
		wall
		wnext
		write
		write
		wq
		wqall
		X
		xit
		yank
		z
		&
		@
		=
		!
		<>
		~
		address
		ENTER
The sed Editor
	Conceptual Overview
		Typical Uses of sed
		sed Operation
	Command-Line Syntax
		Standard Options
		GNU sed Options
	Syntax of sed Commands
		Pattern Addressing
		Examples
		GNU sed Regular Expression Extensions
	Group Summary of sed Commands
		Basic Editing
		Line Information
		Input/Output Processing
		Yanking and Putting
		Branching Commands
		Multiline Input Processing
	Alphabetical Summary of sed Commands
		#
		:
		=
		a
		b
		c
		d
		D
		e
		g
		G
		h
		H
		i
		l
		n
		N
		p
		P
		q
		Q
		r
		R
		s
		t
		T
		v
		w
		W
		x
		y
The awk Programming Language
	Conceptual Overview
	Command-Line Syntax
		Standard Options
		Important gawk Options
	Patterns and Procedures
		Patterns
		Procedures
		Simple Pattern-Action Examples
	Built-in Variables
	Operators
	Variable and Array Assignment
		Escape Sequences
		Octal and Hexadecimal Constants in gawk
	User-Defined Functions
	Gawk-Specific Features
		Coprocesses and Sockets
		Profiling
		File Inclusion
		Internationalization
	Implementation Limits
	Group Listing of awk Functions and Commands
	Alphabetical Summary of awk Functions andCommands
		#
		and
		asort
		asorti
		atan2
		bindtextdomain
		break
		close
		compl
		continue
		cos
		dcgettext
		dcngettext
		delete
		do
		exit
		exp
		extension
		fflush
		for
		for
		function
		gensub
		getline
		gsub
		if
		index
		int
		length
		log
		lshift
		match
		mktime
		next
		nextfile
		or
		print
		printf
		rand
		return
		rshift
		sin
		split
		sprintf
		sqrt
		srand
		strftime
		strtonum
		sub
		substr
		system
		systime
		tolower
		toupper
		while
		xor
	Output Redirections
		printf Formats
	Source Code
III
Source Code Management: AnOverview
	Introduction and Terminology
	Usage Models
	Unix Source Code Management Systems
	Other Source Code Management Systems
The Revision Control System
	Overview of Commands
	Basic Operation
	General RCS Specifications
		Keyword Substitution
		Keywords
		Example Values
		Revision Numbering
		Specifying the Date
		Specifying States
		Standard Options and Environment Variables
	Alphabetical Summary of Commands
		ci
		co
		ident
		merge
		rcs
		rcsclean
		rcsdiff
		rcsfreeze
		rcsmerge
		rlog
The Concurrent Versions System
	Conceptual Overview
		CVS Wrappers
		Stickiness
	Command-Line Syntax and Options
		cvs Options
		Common Subcommand Options
	Dot Files
	Environment Variables
		Client Environment Variables
		Server Environment Variables
	Keywords and Keyword Modes
	Dates
		Legal Date Formats
			ISO 8601
			RFC 822 and RFC 1123
		Legal Date Keywords
		Time Zones
	CVSROOT Variables
		Environment Variables in CVSROOT Files
		Internal Variables in CVSROOT Files
		Shell Variables in CVSROOT Files
	Alphabetical Summary of Commands
		add
		admin
		annotate
		checkout
		commit
		diff
		edit
		editors
		export
		history
		import
		init
		kserver
		log
		login
		logout
		pserver
		rannotate
		rdiff
		release
		remove
		rlog
		rtag
		server
		status
		tag
		unedit
		update
		version
		watch
		watchers
The Subversion Version Control System
	Conceptual Overview
		Basic Version Control Operations
		Building a Better CVS
		Converting a Repository from CVS to Subversion
		Special File Properties
	Obtaining Subversion
		Subversion Releases
		A View Down the Road
		Source Code
	Using Subversion: A Quick Tour
	The Subversion Command Line Client: svn
		svn Options
		svn Subcommands
			add
			blame
			cat
			checkout
			cleanup
			commit
			copy
			delete
			diff
			export
			help
			import
			info
			list
			log
			merge
			mkdir
			move
			propdel
			propedit
			propget
			proplist
			propset
			resolved
			revert
			status
			switch
			update
	Repository Administration: svnadmin
		svnadmin Options
		svnadmin Subcommands
			create
			deltify
			dump
			help
			hotcopy
			list-dblogs
			list-unused- dblogs
			load
			lstxns
			recover
			rmtxns
			setlog
			verify
	Examining the Repository: svnlook
		svnlook Options
		svnlook Subcommands
			author
			cat
			changed
			date
			diff
			dirs-changed
			help
			history
			info
			log
			propget
			proplist
			tree
			uuid
			youngest
	Providing Remote Access: svnserve
		svnserve Options
	Other Subversion Components
		svndumpfilter
		svnversion
The GNU make Utility
	Conceptual Overview
	Command-Line Syntax
		Options
	Makefile Lines
		Special Dependencies
		Conditional Input
	Macros
		Creating and Using Macros
			Defining macros
			Macro values
			Exporting macros
			Overriding command-line macros
		Internal Macros
		Macro Modifiers
		Macros with Special Handling
		Text Manipulation with Macros and Functions
	Special Target Names
	Writing Command Lines
The GDB Debugger
	Conceptual Overview
		Source Code Locations
	Command-Line Syntax
	Initialization Files
		The .gdbinit File
		The .inputrc File
	GDB Expressions
		The Value History
		Convenience Variables and Machine Registers
		Special Expressions
	The GDB Text User Interface
	Group Listing of GDB Commands
		Aliases for Other Commands
		Breakpoints
		Examining Data
		Controlling and Examining Files
		Running a Program
		Examining the Stack
		Status Inquiries
		Support Facilities
		Text User Interface Commands
		Frequently Used Commands
	Summary of set and show Commands
		annotate
		architecture
		args
		auto-solib-add
		auto-solib-limit
		backtrace
		breakpoint
		can-use-hw- watchpoints
		case-sensitive
		coerce-float-to- double
		commands
		complaints
		confirm
		convenience
		copying
		cp-abi
		debug-file- directory
		demangle-style
		directories
		disassembly- flavor
		editing
		environment
		exec-done- display
		extension- language
		follow-fork- mode
		gnutarget
		height
		history
		input-radix
		language
		listsize
		logging
		max-user-call- depth
		opaque-type- resolution
		osabi
		output-radix
		overload- resolution
		pagination
		paths
		print
		prompt
		radix
		scheduler- locking
		solib-absolute- prefix
		solib-search- path
		step-mode
		stop-on-solib- events
		symbol- reloading
		trust-readonly- sections
		tui
		values
		variable
		verbose
		version
		warranty
		watchdog
		width
		write
	Summary of the info Command
	Alphabetical Summary of GDB Commands
		add-symbol-file
		advance
		apropos
		attach
		awatch
		backtrace
		break
		call
		catch
		cd
		clear
		commands
		complete
		condition
		continue
		core-file
		define
		delete
		detach
		directory
		disable
		disassemble
		display
		document
		dont-repeat
		down
		down-silently
		echo
		edit
		else
		enable
		end
		exec-file
		fg
		file
		finish
		focus
		forward-search
		frame
		generate-core- file
		handle
		hbreak
		help
		if
		ignore
		inspect
		info
		jump
		kill
		layout
		list
		macro
		make
		mem
		next
		nexti
		nosharedlibrary
		output
		path
		print
		print-object
		printf
		ptype
		pwd
		quit
		rbreak
		refresh
		return
		reverse-search
		run
		rwatch
		search
		section
		select-frame
		set
		sharedlibrary
		shell
		show
		signal
		silent
		source
		step
		stepi
		symbol-file
		tbreak
		tcatch
		thbreak
		thread
		tty
		tui
		undisplay
		unset
		until
		up
		up-silently
		update
		watch
		whatis
		where
		while
		winheight
		x
Writing Manual Pages
	Introduction
	Overview of nroff/troff
		Command-Line Invocation
			Example
		Conceptual Overview
			Requests and macros
			Specifying measurements
			Requests that cause a line break
			Embedded formatting controls
		Outline of Useful Requests
		Useful Escape Sequences
		Special Characters
	Alphabetical Summary of man Macros
		.B
		.BI
		.BR
		.DT
		.HP
		.I
		.IB
		.IP
		.IR
		.LP
		.P
		.PD
		.PP
		.RB
		.RE
		.RI
		.RS
		.SB
		.SH
		.SM
		.SS
		.TH
		.TP
	Predefined Strings
	Internal Names
	Sample Document
IV
ISO 8859-1 (Latin-1) CharacterSet
Bibliography
	Unix Descriptions and Programmer’s Manuals
	Unix Internals
	System and Network Administration
	Programming with the Unix Mindset
	Programming Languages
	TCP/IP Networking
	Software Development
	Emacs
	Standards
	O’Reilly Books
Index
                        
Document Text Contents
Page 454

434 | Chapter 5: tcsh: An Extended C Shell

This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.

Environment variables are assigned as follows:

setenv VAR value

By convention, environment variable names are all uppercase. You can create your
own environment variables, or you can use the predefined environment variables
that follow.

The following environment variables have corresponding tcsh shell variables.
When either one changes, the value is copied to the other.

Other environment variables, which do not have corresponding shell variables,
include the following:

AFSUSER Alternative to local user for Kerberos authentication with autologout
locking; same as afsuser.

GROUP User’s group name; same as group.
HOME Home directory; same as home.
PATH Search path for commands; same as path.
SHLVL Number of nested shell levels; same as shlvl.
TERM Terminal type; same as term.
USER User’s login name; same as user.

COLUMNS Number of columns on terminal.
DISPLAY Identifies user’s display for the X Window System. If set, the shell doesn’t

set autologout.
EDITOR Pathname to default editor. See also VISUAL.
EXINIT A string of ex commands similar to those found in the startup .exrc file

(e.g., set ai). Used by vi and ex. See also Chapter 9.
HOST Name of machine.
HOSTTYPE Type of machine. Obsolete; will be removed eventually.
HPATH Colon-separated list of directories to search for documentation for the run-

help editor command.
LANG Preferred language. Used for native language support.
LC_CTYPE The locale, as it affects character handling. Used for native language support.
LINES Number of lines on the screen.
LOGNAME Another name for the USER variable.
LS_COLORS Colors for use with the ls command. See the tcsh manpage for detailed

information.
MACHTYPE Type of machine.
MAIL The file that holds mail. Used by mail programs. This is not the same as the

shell variable mail, which only checks for new mail.
NOREBIND Printable characters not rebound. Used for native language support.
OSTYPE Operating system.
PWD The current directory; the value is copied from cwd, but only after a

directory change.
REMOTEHOST Machine name of remote host from which the user logged in.
SHELL Undefined by default; once initialized to shell, the two are identical.
TERMCAP The file that holds the cursor-positioning codes for your terminal type.

Default is /etc/termcap.
VENDOR System vendor.
VISUAL Pathname to default full-screen editor. See also EDITOR.

www.it-ebooks.info

http://www.it-ebooks.info/

Page 455

Expressions | 435

tcsh

This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.

Expressions
Expressions are used in @ (the C shell math operator), if, and while statements to
perform arithmetic, string comparisons, file testing, and so on. exit and set also
specify expressions, as can the tcsh built-in command filetest. Expressions are
formed by combining variables and constants with operators that resemble those
in the C programming language. Operator precedence is the same as in C. It is
easiest to just remember the following precedence rules:

• * / %
• + -

• Group all other expressions inside ()s; parentheses are required if the expres-
sion contains <, >, &, or |

Operators
Operators can be one of the following types.

Assignment operators

Arithmetic operators

Bitwise and logical operators

Operator Description

= Assign value.

+= -= Reassign after addition/subtraction.

*= /= %= Reassign after multiplication/division/remainder.

&= ^= |= Reassign after bitwise AND/XOR/OR.

++ Increment.

-- Decrement.

Operator Description

* / % Multiplication; integer division; modulus (remainder).

+ - Addition; subtraction.

Operator Description

~ Binary inversion (one’s complement).

! Logical negation.

<< >> Bitwise left shift; bitwise right shift.

& Bitwise AND.

^ Bitwise exclusive OR.

| Bitwise OR.

&& Logical AND (short-circuit).

|| Logical OR (short-circuit).

{ command } Return 1 if command is successful, 0 otherwise. Note that this is the
opposite of command ’s normal return code. The $status variable may
be more practical.

www.it-ebooks.info

http://www.it-ebooks.info/

Page 907

About the Author

Arnold Robbins, an Atlanta native, is a professional programmer and technical
author. He is also a happy husband, the father of four very cute children, and an
amateur Talmudist (Babylonian and Jerusalem). Since late 1997, he and his family
have been living in Israel.

Arnold has been working with Unix systems since 1980, when he was introduced
to a PDP-11 running a version of Sixth Edition Unix. His experience also includes
multiple commercial Unix systems, from Sun, IBM, HP, and DEC. He has been
working with GNU/Linux systems since 1996, and for this book was introduced
to the joys of the Macintosh. (iTunes is now his current favorite “killer app.”)

Arnold has also been a heavy awk user since 1987, when he became involved with
gawk, the GNU project’s version of awk. As a member of the POSIX 1003.2
balloting group, he helped shape the POSIX standard for awk. He is currently the
maintainer of gawk and its documentation.

In previous incarnations he has been a systems administrator and a teacher of
Unix and networking Continuing Education classes. He has also had more than
one poor experience with start-up software companies, which he prefers not to
think about anymore. These days he writes high-end Command and Control–
related software for a leading Isreali software compnay. One day he hopes to put
up his own web site at http://www.skeeve.com.

O’Reilly has been keeping him busy; he is author and/or coauthor of these best-
selling titles: Learning the vi Editor, Effective awk Programming, sed & awk,
Classic Shell Scripting, and several pocket references.

Colophon

Our look is the result of reader comments, our own experimentation, and feed-
back from distribution channels. Distinctive covers complement our distinctive
approach to technical topics, breathing personality and life into potentially dry
subjects.

The animal on the cover of Unix in a Nutshell, Fourth Edition, is a tarsier, a
nocturnal mammal related to the lemur. Its generic name, Tarsius, is derived from
the animal’s very long ankle bone, the tarsus. The tarsier is a native of the East
Indies jungles from Sumatra to the Philippines and Sulawesi, where it lives in the
trees, leaping from branch to branch with extreme agility and speed.

A small animal, the tarsier’s body is only 6 inches long, followed by a 10-inch
tufted tail. It is covered in soft brown or grey silky fur, has a round face, and huge
eyes. Its arms and legs are long and slender, as are its digits, which are tipped with
rounded, fleshy pads to improve the tarsier’s grip on trees. Tarsiers are active only
at night, hiding during the day in tangles of vines or in the tops of tall trees. They
subsist mainly on insects, and though very curious animals, tend to be loners.

,AUTHOR.COLO.13098 Page 1 Tuesday, August 22, 2006 4:53 PM

Page 908

Colleen Gorman was the production editor and the copyeditor for Unix in a
Nutshell, Fourth Edition. Genevieve d’Entremont and Mary Brady provided
quality control. Ellen Troutman wrote the index.

Edie Freedman designed the cover of this book. The cover image is a 19th-century
engraving from the Dover Pictorial Archive. Karen Montgomery produced the
cover layout with Adobe InDesign CS using Adobe’s ITC Garamond font. The
back cover illustration is by J.D. “Illiad” Frazer.

David Futato designed the interior layout. This book was converted by Keith
Fahlgren to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray,
Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technolo-
gies. The text font is Linotype Birka; the heading font is Adobe Myriad
Condensed; and the code font is LucasFont’s TheSans Mono Condensed. The
illustrations that appear in the book were produced by Robert Romano, Jessamyn
Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop
CS. The tip and warning icons were drawn by Christopher Bing. This colophon
was written by Michael Kalantarian.

,AUTHOR.COLO.13098 Page 2 Tuesday, August 22, 2006 4:53 PM

Similer Documents