bash Cookbook: Solutions and Examples for bash Users (Cookbooks (O'Reilly))
Carl Albing
Language: English
Pages: 630
ISBN: 0596526784
Format: PDF / Kindle (mobi) / ePub
The key to mastering any Unix system, especially Linux and Mac OS X, is a thorough knowledge of shell scripting. Scripting is a way to harness and customize the power of any Unix system, and it's an essential skill for any Unix users, including system administrators and professional OS X developers. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards.
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages. Packed full of useful scripts, along with examples that explain how to create better scripts, this new cookbook gives professionals and power users everything they need to automate routine tasks and enable them to truly manage their systems -- rather than have their systems manage them.
the execution call stack. The element with index 0 is the name of any currently-executing shell function. The bottom-most element is "main." This variable exists only when a shell function is executing. FCEDIT The default editor for the fc command. FIGNORE L A list of names to ignore when doing filename completion. GLOBIGNORE L A list of patterns defining filenames to ignore during pathname expansion. GROUPS AR An array containing a list of groups of which the current user is a
example that will not display well in the table. The traditional way to write printf statements is to embed all formatting, including things like newlines, in the format string. This is shown in the table. That is encouraged, but you don't have to do it that way, and sometimes it's easier if you don't. Note the →denotes a Tab character in the output: $ printf "%b" "\aRing terminal bell, then tab\t then newline\nThen line 2.\n" Ring terminal bell, then tab → then newline Then line 2. See
line. Ctrl-B Move backward one character. Ctrl-D Delete one character forward. Ctrl-E Move to end of line. Ctrl-F Move forward one character. Ctrl-G Abort the current editing command and ring the terminal bell. Ctrl-J Same as Return. Ctrl-K Delete (kill) forward to end of line. Ctrl-L Clear screen and redisplay the line. Ctrl-M Same as Return. Ctrl-N Next line in command history. Ctrl-O Same as Return, then display next line in history file. Ctrl-P
Discussion, Discussion, Discussion, Discussion, Discussion, Discussion, Pattern-Matching Characters *.txt, Discussion -a operator, Discussion :+ variable operator, Discussion :- assignment operator, Discussion ?, Discussion, Pattern-Matching Characters assignment, Discussion comma operator (, Discussion comparison, Discussion extended pattern-matching, Discussion redirection, Discussion string-manipulation, Discussion option filename, Discussion options, Discussion, Solution,
RC files, creating portable files, Problem, Solution, Solution RE (regular expression), Intermediate Shell Tools I, Discussion, Discussion RE (regular expressions), Discussion read statement, Solution, Solution, Problem, Solution readability, Problem readline, Discussion, Solution, Problem readline.3, Official documentation README, Official documentation real arguments, Problem reconnect to a background job, Discussion recovering sessions, Problem Red Hat, Discussion, Discussion,