bash Pocket Reference (Pocket Reference (O'Reilly))

bash Pocket Reference (Pocket Reference (O'Reilly))

Arnold Robbins

Language: English

Pages: 134

ISBN: 1449387888

Format: PDF / Kindle (mobi) / ePub


It's simple: you need to know how to work with the bash shell if you want to get to the heart of Mac OS X, Linux, and other Unix systems. Updated for the most recent version of bash, this concise little book puts all of the essential information about bash at your fingertips. You'll quickly find answers to annoying questions that always come up when you're writing shell scripts -- What characters do you need to quote? How do you get variable substitution to do exactly what you want? How do you use arrays? -- and much more.

If you're a user or programmer of any Unix variant, or if you're using bash on Windows, you'll find this pocket reference indispensable. This book covers:

  • Invoking the Shell
  • Syntax
  • Functions
  • Variables
  • Arithmetic Expressions
  • Command History
  • Programmable Completion
  • Job Control
  • Shell Options
  • Command Execution
  • Coprocesses
  • Restricted Shells
  • Built-in Commands

 

 

 

 

 

 

 

 

 

 

the job control features are automatically enabled. Many job control commands take a jobID as an argument, which can be specified as follows: %n Job number n %s Job whose command line starts with string s %?s Job whose command line contains string s %% Current job %+ Current job (same as above) % Current job (same as above) %- Previous job The shell provides the following job control commands. For more information on these commands, see the section Built-in Commands. bg Put the

metacharacters. " ' \ Used in quoting other characters. ` Command substitution. $ Variable substitution (or command or arithmetic substitution). # Start a comment that continues to the end of the line. space tab newline Word separators. These characters can be used for quoting: " " Everything between " and " is taken literally, except for the following characters that keep their special meaning: $ Variable (or command and arithmetic) substitution will occur. `

reviewing this reference. Thanks to Robert P.J. Day for reviewing this edition. Thanks again to Mike Loukides at O’Reilly Media for his continued support of this project. Index * * * A note on the digital index A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in

editor, Bash command-line editing mode, Line-Edit Mode EMACS shell variable, Other Shell Variables enable command, enable ENV shell variable, Other Shell Variables equals sign (=), == equality operator, Operators ERR trap, Functions esac command, esac escape sequence, Quoting escape sequences, quoted text, Quoting EUID shell variable, Built-in Shell Variables eval command, eval evaluating conditions, test event designators, Event designators exclamation mark (!), Filename

Tabs, ! for the list of alternatives on partial word completion, @ for completions if the word is modified, or % for menu completion. COMP_WORDBREAKS For programmable completion. The characters that the readline library treats as word separators when doing word completion. COMP_WORDS For programmable completion. Array variable containing the individual words on the command line. COPROC Array variable that holds the file descriptors used for communicating with an unnamed

Download sample

Download