Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cooper M.Advanced bash-scripting guide.2002.pdf
Скачиваний:
13
Добавлен:
23.08.2013
Размер:
916.67 Кб
Скачать

Chapter 18. Recess Time

This bizarre little intermission gives the reader a chance to relax and maybe laugh a bit.

Fellow Linux user, greetings! You are reading something which will bring you luck and good fortune. Just e−mail a copy of this document to 10 of your friends. Before you make the copies, send a 100−line Bash script to the first person on the list given at the bottom of this letter. Then delete their name and add yours to the bottom of the list.

Don't break the chain! Make the copies within 48 hours. Wilfred P. of Brooklyn failed to send out his ten copies and woke the next morning to find his job description changed

to "COBOL programmer." Howard L. of Newport News sent out his ten copies and within a month had enough hardware to build a 100−node Beowulf cluster dedicated to playing xbill. Amelia V. of Chicago laughed at this letter and

broke the chain. Shortly thereafter, a fire broke out in her terminal and she now spends her days writing documentation for MS Windows.

Don't break the chain! Send out your ten copies today!

Courtesy 'NIX "fortune cookies", with some alterations and many apologies

Part 4. Advanced Topics

Table of Contents

19.Regular Expressions

19.1.A Brief Introduction to Regular Expressions

19.2.Globbing

20.Subshells

21.Restricted Shells

22.Process Substitution

23.Functions

23.1.Complex Functions and Function Complexities

23.2.Local Variables

24.Aliases

25.List Constructs

26.Arrays

27.Files

28./dev and /proc

Chapter 18. Recess Time

232

Advanced Bash−Scripting Guide

28.1./dev

28.2./proc

29.Of Zeros and Nulls

30.Debugging

31.Options

32.Gotchas

33.Scripting With Style

33.1.Unofficial Shell Scripting Stylesheet

34.Miscellany

34.1.Interactive and non−interactive shells and scripts

34.2.Shell Wrappers

34.3.Tests and Comparisons: Alternatives

34.4.Optimizations

34.5.Assorted Tips

34.6.Oddities

34.7.Portability Issues

34.8.Shell Scripting Under Windows

35.Bash, version 2

Chapter 18. Recess Time

233