12.07.2015 Views

Advanced Bash-Scripting Guide

Advanced Bash-Scripting Guide

Advanced Bash-Scripting Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

◊When inputting text, Ctl-V permits inserting control characters. For example, the followingtwo are equivalent:echo -e '\x0a'echo Ctl-V is primarily useful from within a text editor.Ctl-WWhen typing text on the console or in an xterm window, Ctl-W erases from the characterunder the cursor backwards to the first instance of whitespace. In some settings, Ctl-Werases backwards to first non-alphanumeric character.◊ Ctl-YPastes back text previously erased (with Ctl-K or Ctl-U).◊ Ctl-ZPauses a foreground job.<strong>Advanced</strong> <strong>Bash</strong>-<strong>Scripting</strong> <strong>Guide</strong>Substitute operation in certain word processing applications.EOF (end-of-file) character in the MSDOS filesystem.Whitespacefunctions as a separator, separating commands or variables. Whitespace consists of either spaces,tabs, blank lines, or any combination thereof. [20] In some contexts, such as variable assignment,whitespace is not permitted, and results in a syntax error.Blank lines have no effect on the action of a script, and are therefore useful for visually separatingfunctional sections.$IFS, the special variable separating fields of input to certain commands, defaults to whitespace.To preserve whitespace within a string or in a variable, use quoting.Chapter 3. Special Characters 26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!