Debian Codegraph @

HTML/index.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Advanced Bash-Scripting Guide</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="NEXT"
11 TITLE="Introduction"
12 HREF="part1.html"><META
13 HTTP-EQUIV="Content-Style-Type"
14 CONTENT="text/css"><LINK
15 REL="stylesheet"
16 HREF="common/kde-common.css"
17 TYPE="text/css"><META
18 HTTP-EQUIV="Content-Type"
19 CONTENT="text/html; charset=iso-8859-1"><META
20 HTTP-EQUIV="Content-Language"
21 CONTENT="en"><LINK
22 REL="stylesheet"
23 HREF="common/kde-localised.css"
24 TYPE="text/css"
25 TITLE="KDE-English"><LINK
26 REL="stylesheet"
27 HREF="common/kde-default.css"
28 TYPE="text/css"
29 TITLE="KDE-Default"></HEAD
30 ><BODY
31 CLASS="BOOK"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#AA0000"
35 VLINK="#AA0055"
36 ALINK="#AA0000"
37 STYLE="font-family: sans-serif;"
38 ><DIV
39 CLASS="BOOK"
40 ><A
41 NAME="AEN1"
42 ></A
43 ><DIV
44 CLASS="TITLEPAGE"
45 ><H1
46 CLASS="TITLE"
47 ><A
48 NAME="AEN2"
49 >Advanced Bash-Scripting Guide</A
50 ></H1
51 ><H2
52 CLASS="SUBTITLE"
53 >An in-depth exploration of the art of shell scripting</H2
54 >Version <SPAN
55 CLASS="RELEASEINFO"
56 >10<BR></SPAN
57 ><P
58 CLASS="PUBDATE"
59 >10 Mar 2014<BR></P
60 ><H3
61 CLASS="AUTHOR"
62 ><A
63 NAME="AEN5"
64 >Mendel Cooper</A
65 ></H3
66 ><DIV
67 CLASS="AFFILIATION"
68 ><SPAN
69 CLASS="ORGNAME"
70 ><BR></SPAN
71 ><DIV
72 CLASS="ADDRESS"
73 ><P
74 CLASS="ADDRESS"
75 >[email protected]</P
76 ></DIV
77 ></DIV
78 ><DIV
79 ><DIV
80 CLASS="ABSTRACT"
81 ><A
82 NAME="AEN31"
83 ></A
84 ><P
85 >This tutorial assumes no previous knowledge of
86 scripting or programming, yet progresses rapidly toward an
87 intermediate/advanced level of instruction <SPAN
88 CLASS="emphasis"
89 ><I
90 CLASS="EMPHASIS"
91 >. . . all
92 the while sneaking in little nuggets of <SPAN
93 CLASS="TRADEMARK"
94 >UNIX</SPAN
95 >&reg; wisdom and lore</I
96 ></SPAN
97 >. It
98 serves as a textbook, a manual for self-study, and as a reference and
99 source of knowledge on shell scripting techniques. The exercises
100 and heavily-commented examples invite active reader participation,
101 under the premise that <TT
102 CLASS="USERINPUT"
103 ><B
104 >the only way to really learn
105 scripting is to write scripts</B
106 ></TT
107 >.</P
108 ><P
109 >This book is suitable for classroom use as a
110 general introduction to programming concepts.</P
111 ><P
112 >This document is herewith granted to the Public Domain.
113 <TT
114 CLASS="USERINPUT"
115 ><B
116 >No copyright!</B
117 ></TT
118 ></P
119 ></DIV
120 ></DIV
121 ><HR></DIV
122 ><H1
123 ><A
124 NAME="AEN39"
125 ></A
126 >Dedication</H1
127 ><P
128 >For Anita, the source of all the magic</P
129 ><DIV
130 CLASS="TOC"
131 ><DL
132 ><DT
133 ><B
134 >Table of Contents</B
135 ></DT
136 ><DT
137 >Part 1. <A
138 HREF="part1.html"
139 >Introduction</A
140 ></DT
141 ><DD
142 ><DL
143 ><DT
144 >1. <A
145 HREF="why-shell.html"
146 >Shell Programming!</A
147 ></DT
148 ><DT
149 >2. <A
150 HREF="sha-bang.html"
151 >Starting Off With a Sha-Bang</A
152 ></DT
153 ><DD
154 ><DL
155 ><DT
156 >2.1. <A
157 HREF="sha-bang.html#INVOKING"
158 >Invoking the script</A
159 ></DT
160 ><DT
161 >2.2. <A
162 HREF="prelimexer.html"
163 >Preliminary Exercises</A
164 ></DT
165 ></DL
166 ></DD
167 ></DL
168 ></DD
169 ><DT
170 >Part 2. <A
171 HREF="part2.html"
172 >Basics</A
173 ></DT
174 ><DD
175 ><DL
176 ><DT
177 >3. <A
178 HREF="special-chars.html"
179 >Special Characters</A
180 ></DT
181 ><DT
182 >4. <A
183 HREF="variables.html"
184 >Introduction to Variables and Parameters</A
185 ></DT
186 ><DD
187 ><DL
188 ><DT
189 >4.1. <A
190 HREF="variables.html#VARSUBN"
191 >Variable Substitution</A
192 ></DT
193 ><DT
194 >4.2. <A
195 HREF="varassignment.html"
196 >Variable Assignment</A
197 ></DT
198 ><DT
199 >4.3. <A
200 HREF="untyped.html"
201 >Bash Variables Are Untyped</A
202 ></DT
203 ><DT
204 >4.4. <A
205 HREF="othertypesv.html"
206 >Special Variable Types</A
207 ></DT
208 ></DL
209 ></DD
210 ><DT
211 >5. <A
212 HREF="quoting.html"
213 >Quoting</A
214 ></DT
215 ><DD
216 ><DL
217 ><DT
218 >5.1. <A
219 HREF="quoting.html#QUOTINGVAR"
220 >Quoting Variables</A
221 ></DT
222 ><DT
223 >5.2. <A
224 HREF="escapingsection.html"
225 >Escaping</A
226 ></DT
227 ></DL
228 ></DD
229 ><DT
230 >6. <A
231 HREF="exit-status.html"
232 >Exit and Exit Status</A
233 ></DT
234 ><DT
235 >7. <A
236 HREF="tests.html"
237 >Tests</A
238 ></DT
239 ><DD
240 ><DL
241 ><DT
242 >7.1. <A
243 HREF="tests.html#TESTCONSTRUCTS"
244 >Test Constructs</A
245 ></DT
246 ><DT
247 >7.2. <A
248 HREF="fto.html"
249 >File test operators</A
250 ></DT
251 ><DT
252 >7.3. <A
253 HREF="comparison-ops.html"
254 >Other Comparison Operators</A
255 ></DT
256 ><DT
257 >7.4. <A
258 HREF="nestedifthen.html"
259 >Nested <TT
260 CLASS="REPLACEABLE"
261 ><I
262 >if/then</I
263 ></TT
264 > Condition Tests</A
265 ></DT
266 ><DT
267 >7.5. <A
268 HREF="testtest.html"
269 >Testing Your Knowledge of Tests</A
270 ></DT
271 ></DL
272 ></DD
273 ><DT
274 >8. <A
275 HREF="operations.html"
276 >Operations and Related Topics</A
277 ></DT
278 ><DD
279 ><DL
280 ><DT
281 >8.1. <A
282 HREF="operations.html#OPS"
283 >Operators</A
284 ></DT
285 ><DT
286 >8.2. <A
287 HREF="numerical-constants.html"
288 >Numerical Constants</A
289 ></DT
290 ><DT
291 >8.3. <A
292 HREF="dblparens.html"
293 >The Double-Parentheses Construct</A
294 ></DT
295 ><DT
296 >8.4. <A
297 HREF="opprecedence.html"
298 >Operator Precedence</A
299 ></DT
300 ></DL
301 ></DD
302 ></DL
303 ></DD
304 ><DT
305 >Part 3. <A
306 HREF="part3.html"
307 >Beyond the Basics</A
308 ></DT
309 ><DD
310 ><DL
311 ><DT
312 >9. <A
313 HREF="variables2.html"
314 >Another Look at Variables</A
315 ></DT
316 ><DD
317 ><DL
318 ><DT
319 >9.1. <A
320 HREF="variables2.html#INTERNALVARIABLES"
321 >Internal Variables</A
322 ></DT
323 ><DT
324 >9.2. <A
325 HREF="declareref.html"
326 >Typing variables: <B
327 CLASS="COMMAND"
328 >declare</B
329 > or
330 <B
331 CLASS="COMMAND"
332 >typeset</B
333 ></A
334 ></DT
335 ><DT
336 >9.3. <A
337 HREF="randomvar.html"
338 >$RANDOM: generate random integer</A
339 ></DT
340 ></DL
341 ></DD
342 ><DT
343 >10. <A
344 HREF="manipulatingvars.html"
345 >Manipulating Variables</A
346 ></DT
347 ><DD
348 ><DL
349 ><DT
350 >10.1. <A
351 HREF="manipulatingvars.html#STRING-MANIPULATION"
352 >Manipulating Strings</A
353 ></DT
354 ><DT
355 >10.2. <A
356 HREF="parameter-substitution.html"
357 >Parameter Substitution</A
358 ></DT
359 ></DL
360 ></DD
361 ><DT
362 >11. <A
363 HREF="loops.html"
364 >Loops and Branches</A
365 ></DT
366 ><DD
367 ><DL
368 ><DT
369 >11.1. <A
370 HREF="loops.html#LOOPS1"
371 >Loops</A
372 ></DT
373 ><DT
374 >11.2. <A
375 HREF="nestedloops.html"
376 >Nested Loops</A
377 ></DT
378 ><DT
379 >11.3. <A
380 HREF="loopcontrol.html"
381 >Loop Control</A
382 ></DT
383 ><DT
384 >11.4. <A
385 HREF="testbranch.html"
386 >Testing and Branching</A
387 ></DT
388 ></DL
389 ></DD
390 ><DT
391 >12. <A
392 HREF="commandsub.html"
393 >Command Substitution</A
394 ></DT
395 ><DT
396 >13. <A
397 HREF="arithexp.html"
398 >Arithmetic Expansion</A
399 ></DT
400 ><DT
401 >14. <A
402 HREF="recess-time.html"
403 >Recess Time</A
404 ></DT
405 ></DL
406 ></DD
407 ><DT
408 >Part 4. <A
409 HREF="part4.html"
410 >Commands</A
411 ></DT
412 ><DD
413 ><DL
414 ><DT
415 >15. <A
416 HREF="internal.html"
417 >Internal Commands and Builtins</A
418 ></DT
419 ><DD
420 ><DL
421 ><DT
422 >15.1. <A
423 HREF="internal.html#AEN9644"
424 >Job Control Commands</A
425 ></DT
426 ></DL
427 ></DD
428 ><DT
429 >16. <A
430 HREF="external.html"
431 >External Filters, Programs and Commands</A
432 ></DT
433 ><DD
434 ><DL
435 ><DT
436 >16.1. <A
437 HREF="external.html#BASIC"
438 >Basic Commands</A
439 ></DT
440 ><DT
441 >16.2. <A
442 HREF="moreadv.html"
443 >Complex Commands</A
444 ></DT
445 ><DT
446 >16.3. <A
447 HREF="timedate.html"
448 >Time / Date Commands</A
449 ></DT
450 ><DT
451 >16.4. <A
452 HREF="textproc.html"
453 >Text Processing Commands</A
454 ></DT
455 ><DT
456 >16.5. <A
457 HREF="filearchiv.html"
458 >File and Archiving Commands</A
459 ></DT
460 ><DT
461 >16.6. <A
462 HREF="communications.html"
463 >Communications Commands</A
464 ></DT
465 ><DT
466 >16.7. <A
467 HREF="terminalccmds.html"
468 >Terminal Control Commands</A
469 ></DT
470 ><DT
471 >16.8. <A
472 HREF="mathc.html"
473 >Math Commands</A
474 ></DT
475 ><DT
476 >16.9. <A
477 HREF="extmisc.html"
478 >Miscellaneous Commands</A
479 ></DT
480 ></DL
481 ></DD
482 ><DT
483 >17. <A
484 HREF="system.html"
485 >System and Administrative Commands</A
486 ></DT
487 ><DD
488 ><DL
489 ><DT
490 >17.1. <A
491 HREF="system.html#SYSSCRIPTS"
492 >Analyzing a System Script</A
493 ></DT
494 ></DL
495 ></DD
496 ></DL
497 ></DD
498 ><DT
499 >Part 5. <A
500 HREF="part5.html"
501 >Advanced Topics</A
502 ></DT
503 ><DD
504 ><DL
505 ><DT
506 >18. <A
507 HREF="regexp.html"
508 >Regular Expressions</A
509 ></DT
510 ><DD
511 ><DL
512 ><DT
513 >18.1. <A
514 HREF="regexp.html#AEN17129"
515 >A Brief Introduction to Regular Expressions</A
516 ></DT
517 ><DT
518 >18.2. <A
519 HREF="globbingref.html"
520 >Globbing</A
521 ></DT
522 ></DL
523 ></DD
524 ><DT
525 >19. <A
526 HREF="here-docs.html"
527 >Here Documents</A
528 ></DT
529 ><DD
530 ><DL
531 ><DT
532 >19.1. <A
533 HREF="here-docs.html#AEN17837"
534 >Here Strings</A
535 ></DT
536 ></DL
537 ></DD
538 ><DT
539 >20. <A
540 HREF="io-redirection.html"
541 >I/O Redirection</A
542 ></DT
543 ><DD
544 ><DL
545 ><DT
546 >20.1. <A
547 HREF="io-redirection.html#AEN17974"
548 >Using <I
549 CLASS="FIRSTTERM"
550 >exec</I
551 ></A
552 ></DT
553 ><DT
554 >20.2. <A
555 HREF="redircb.html"
556 >Redirecting Code Blocks</A
557 ></DT
558 ><DT
559 >20.3. <A
560 HREF="redirapps.html"
561 >Applications</A
562 ></DT
563 ></DL
564 ></DD
565 ><DT
566 >21. <A
567 HREF="subshells.html"
568 >Subshells</A
569 ></DT
570 ><DT
571 >22. <A
572 HREF="restricted-sh.html"
573 >Restricted Shells</A
574 ></DT
575 ><DT
576 >23. <A
577 HREF="process-sub.html"
578 >Process Substitution</A
579 ></DT
580 ><DT
581 >24. <A
582 HREF="functions.html"
583 >Functions</A
584 ></DT
585 ><DD
586 ><DL
587 ><DT
588 >24.1. <A
589 HREF="functions.html#COMPLEXFUNCT"
590 >Complex Functions and Function Complexities</A
591 ></DT
592 ><DT
593 >24.2. <A
594 HREF="localvar.html"
595 >Local Variables</A
596 ></DT
597 ><DT
598 >24.3. <A
599 HREF="recurnolocvar.html"
600 >Recursion Without Local Variables</A
601 ></DT
602 ></DL
603 ></DD
604 ><DT
605 >25. <A
606 HREF="aliases.html"
607 >Aliases</A
608 ></DT
609 ><DT
610 >26. <A
611 HREF="list-cons.html"
612 >List Constructs</A
613 ></DT
614 ><DT
615 >27. <A
616 HREF="arrays.html"
617 >Arrays</A
618 ></DT
619 ><DT
620 >28. <A
621 HREF="ivr.html"
622 >Indirect References</A
623 ></DT
624 ><DT
625 >29. <A
626 HREF="devproc.html"
627 ><TT
628 CLASS="FILENAME"
629 >/dev</TT
630 > and <TT
631 CLASS="FILENAME"
632 >/proc</TT
633 ></A
634 ></DT
635 ><DD
636 ><DL
637 ><DT
638 >29.1. <A
639 HREF="devproc.html#DEVREF1"
640 ><TT
641 CLASS="FILENAME"
642 >/dev</TT
643 ></A
644 ></DT
645 ><DT
646 >29.2. <A
647 HREF="procref1.html"
648 ><TT
649 CLASS="FILENAME"
650 >/proc</TT
651 ></A
652 ></DT
653 ></DL
654 ></DD
655 ><DT
656 >30. <A
657 HREF="networkprogramming.html"
658 >Network Programming</A
659 ></DT
660 ><DT
661 >31. <A
662 HREF="zeros.html"
663 >Of Zeros and Nulls</A
664 ></DT
665 ><DT
666 >32. <A
667 HREF="debugging.html"
668 >Debugging</A
669 ></DT
670 ><DT
671 >33. <A
672 HREF="options.html"
673 >Options</A
674 ></DT
675 ><DT
676 >34. <A
677 HREF="gotchas.html"
678 >Gotchas</A
679 ></DT
680 ><DT
681 >35. <A
682 HREF="scrstyle.html"
683 >Scripting With Style</A
684 ></DT
685 ><DD
686 ><DL
687 ><DT
688 >35.1. <A
689 HREF="scrstyle.html#UNOFFICIALST"
690 >Unofficial Shell Scripting Stylesheet</A
691 ></DT
692 ></DL
693 ></DD
694 ><DT
695 >36. <A
696 HREF="miscellany.html"
697 >Miscellany</A
698 ></DT
699 ><DD
700 ><DL
701 ><DT
702 >36.1. <A
703 HREF="miscellany.html#INTANDNONINT"
704 >Interactive and non-interactive shells and scripts</A
705 ></DT
706 ><DT
707 >36.2. <A
708 HREF="wrapper.html"
709 >Shell Wrappers</A
710 ></DT
711 ><DT
712 >36.3. <A
713 HREF="testsandcomparisons.html"
714 >Tests and Comparisons: Alternatives</A
715 ></DT
716 ><DT
717 >36.4. <A
718 HREF="recursionsct.html"
719 >Recursion: a script calling itself</A
720 ></DT
721 ><DT
722 >36.5. <A
723 HREF="colorizing.html"
724 ><SPAN
725 CLASS="QUOTE"
726 >"Colorizing"</SPAN
727 > Scripts</A
728 ></DT
729 ><DT
730 >36.6. <A
731 HREF="optimizations.html"
732 >Optimizations</A
733 ></DT
734 ><DT
735 >36.7. <A
736 HREF="assortedtips.html"
737 >Assorted Tips</A
738 ></DT
739 ><DT
740 >36.8. <A
741 HREF="securityissues.html"
742 >Security Issues</A
743 ></DT
744 ><DT
745 >36.9. <A
746 HREF="portabilityissues.html"
747 >Portability Issues</A
748 ></DT
749 ><DT
750 >36.10. <A
751 HREF="winscript.html"
752 >Shell Scripting Under Windows</A
753 ></DT
754 ></DL
755 ></DD
756 ><DT
757 >37. <A
758 HREF="bash2.html"
759 >Bash, versions 2, 3, and 4</A
760 ></DT
761 ><DD
762 ><DL
763 ><DT
764 >37.1. <A
765 HREF="bash2.html#BASHVER2"
766 >Bash, version 2</A
767 ></DT
768 ><DT
769 >37.2. <A
770 HREF="bashver3.html"
771 >Bash, version 3</A
772 ></DT
773 ><DT
774 >37.3. <A
775 HREF="bashver4.html"
776 >Bash, version 4</A
777 ></DT
778 ></DL
779 ></DD
780 ></DL
781 ></DD
782 ><DT
783 >38. <A
784 HREF="endnotes.html"
785 >Endnotes</A
786 ></DT
787 ><DD
788 ><DL
789 ><DT
790 >38.1. <A
791 HREF="endnotes.html#AUTHORSNOTE"
792 >Author's Note</A
793 ></DT
794 ><DT
795 >38.2. <A
796 HREF="aboutauthor.html"
797 >About the Author</A
798 ></DT
799 ><DT
800 >38.3. <A
801 HREF="wherehelp.html"
802 >Where to Go For Help</A
803 ></DT
804 ><DT
805 >38.4. <A
806 HREF="toolsused.html"
807 >Tools Used to Produce This Book</A
808 ></DT
809 ><DD
810 ><DL
811 ><DT
812 >38.4.1. <A
813 HREF="toolsused.html#SOFTWARE-HARDWARE"
814 >Hardware</A
815 ></DT
816 ><DT
817 >38.4.2. <A
818 HREF="toolsused.html#SOFTWARE-PRINTWARE"
819 >Software and Printware</A
820 ></DT
821 ></DL
822 ></DD
823 ><DT
824 >38.5. <A
825 HREF="credits.html"
826 >Credits</A
827 ></DT
828 ><DT
829 >38.6. <A
830 HREF="disclaimer.html"
831 >Disclaimer</A
832 ></DT
833 ></DL
834 ></DD
835 ><DT
836 ><A
837 HREF="biblio.html"
838 >Bibliography</A
839 ></DT
840 ><DT
841 >A. <A
842 HREF="contributed-scripts.html"
843 >Contributed Scripts</A
844 ></DT
845 ><DT
846 >B. <A
847 HREF="refcards.html"
848 >Reference Cards</A
849 ></DT
850 ><DT
851 >C. <A
852 HREF="sedawk.html"
853 >A Sed and Awk Micro-Primer</A
854 ></DT
855 ><DD
856 ><DL
857 ><DT
858 >C.1. <A
859 HREF="sedawk.html#AEN23170"
860 >Sed</A
861 ></DT
862 ><DT
863 >C.2. <A
864 HREF="awk.html"
865 >Awk</A
866 ></DT
867 ></DL
868 ></DD
869 ><DT
870 >D. <A
871 HREF="pathmanagement.html"
872 >Parsing and Managing Pathnames</A
873 ></DT
874 ><DT
875 >E. <A
876 HREF="exitcodes.html"
877 >Exit Codes With Special Meanings</A
878 ></DT
879 ><DT
880 >F. <A
881 HREF="ioredirintro.html"
882 >A Detailed Introduction to I/O and I/O Redirection</A
883 ></DT
884 ><DT
885 >G. <A
886 HREF="command-line-options.html"
887 >Command-Line Options</A
888 ></DT
889 ><DD
890 ><DL
891 ><DT
892 >G.1. <A
893 HREF="command-line-options.html#STANDARD-OPTIONS"
894 >Standard Command-Line Options</A
895 ></DT
896 ><DT
897 >G.2. <A
898 HREF="bash-options.html"
899 >Bash Command-Line Options</A
900 ></DT
901 ></DL
902 ></DD
903 ><DT
904 >H. <A
905 HREF="files.html"
906 >Important Files</A
907 ></DT
908 ><DT
909 >I. <A
910 HREF="systemdirs.html"
911 >Important System Directories</A
912 ></DT
913 ><DT
914 >J. <A
915 HREF="tabexpansion.html"
916 >An Introduction to Programmable Completion</A
917 ></DT
918 ><DT
919 >K. <A
920 HREF="localization.html"
921 >Localization</A
922 ></DT
923 ><DT
924 >L. <A
925 HREF="histcommands.html"
926 >History Commands</A
927 ></DT
928 ><DT
929 >M. <A
930 HREF="sample-bashrc.html"
931 >Sample <TT
932 CLASS="FILENAME"
933 >.bashrc</TT
934 > and
935 <TT
936 CLASS="FILENAME"
937 >.bash_profile</TT
938 > Files</A
939 ></DT
940 ><DT
941 >N. <A
942 HREF="dosbatch.html"
943 >Converting DOS Batch Files to Shell Scripts</A
944 ></DT
945 ><DT
946 >O. <A
947 HREF="exercises.html"
948 >Exercises</A
949 ></DT
950 ><DD
951 ><DL
952 ><DT
953 >O.1. <A
954 HREF="exercises.html#SCRIPTANALYSIS"
955 >Analyzing Scripts</A
956 ></DT
957 ><DT
958 >O.2. <A
959 HREF="writingscripts.html"
960 >Writing Scripts</A
961 ></DT
962 ></DL
963 ></DD
964 ><DT
965 >P. <A
966 HREF="revisionhistory.html"
967 >Revision History</A
968 ></DT
969 ><DT
970 >Q. <A
971 HREF="mirrorsites.html"
972 >Download and Mirror Sites</A
973 ></DT
974 ><DT
975 >R. <A
976 HREF="todolist.html"
977 >To Do List</A
978 ></DT
979 ><DT
980 >S. <A
981 HREF="copyright.html"
982 >Copyright</A
983 ></DT
984 ><DT
985 >T. <A
986 HREF="asciitable.html"
987 >ASCII Table</A
988 ></DT
989 ><DT
990 ><A
991 HREF="xrefindex.html"
992 >Index</A
993 ></DT
994 ></DL
995 ></DIV
996 ><DIV
997 CLASS="LOT"
998 ><DL
999 CLASS="LOT"
1000 ><DT
1001 ><B
1002 >List of Tables</B
1003 ></DT
1004 ><DT
1005 >8-1. <A
1006 HREF="opprecedence.html#AEN4294"
1007 >Operator Precedence</A
1008 ></DT
1009 ><DT
1010 >15-1. <A
1011 HREF="internal.html#JOBIDTABLE"
1012 >Job identifiers</A
1013 ></DT
1014 ><DT
1015 >33-1. <A
1016 HREF="options.html#AEN19601"
1017 >Bash options</A
1018 ></DT
1019 ><DT
1020 >36-1. <A
1021 HREF="colorizing.html#AEN20327"
1022 >Numbers representing colors in Escape Sequences</A
1023 ></DT
1024 ><DT
1025 >B-1. <A
1026 HREF="refcards.html#AEN22402"
1027 >Special Shell Variables</A
1028 ></DT
1029 ><DT
1030 >B-2. <A
1031 HREF="refcards.html#AEN22473"
1032 >TEST Operators: Binary Comparison</A
1033 ></DT
1034 ><DT
1035 >B-3. <A
1036 HREF="refcards.html#AEN22593"
1037 >TEST Operators: Files</A
1038 ></DT
1039 ><DT
1040 >B-4. <A
1041 HREF="refcards.html#AEN22728"
1042 >Parameter Substitution and Expansion</A
1043 ></DT
1044 ><DT
1045 >B-5. <A
1046 HREF="refcards.html#AEN22828"
1047 >String Operations</A
1048 ></DT
1049 ><DT
1050 >B-6. <A
1051 HREF="refcards.html#AEN22979"
1052 >Miscellaneous Constructs</A
1053 ></DT
1054 ><DT
1055 >C-1. <A
1056 HREF="sedawk.html#AEN23200"
1057 >Basic sed operators</A
1058 ></DT
1059 ><DT
1060 >C-2. <A
1061 HREF="sedawk.html#AEN23271"
1062 >Examples of sed operators</A
1063 ></DT
1064 ><DT
1065 >E-1. <A
1066 HREF="exitcodes.html#AEN23549"
1067 ><I
1068 CLASS="FIRSTTERM"
1069 >Reserved</I
1070 > Exit Codes</A
1071 ></DT
1072 ><DT
1073 >N-1. <A
1074 HREF="dosbatch.html#AEN24336"
1075 >Batch file keywords / variables / operators, and their shell equivalents</A
1076 ></DT
1077 ><DT
1078 >N-2. <A
1079 HREF="dosbatch.html#AEN24545"
1080 >DOS commands and their UNIX equivalents</A
1081 ></DT
1082 ><DT
1083 >P-1. <A
1084 HREF="revisionhistory.html#AEN25364"
1085 >Revision History</A
1086 ></DT
1087 ></DL
1088 ></DIV
1089 ><DIV
1090 CLASS="LOT"
1091 ><DL
1092 CLASS="LOT"
1093 ><DT
1094 ><B
1095 >List of Examples</B
1096 ></DT
1097 ><DT
1098 >2-1. <A
1099 HREF="sha-bang.html#EX1"
1100 ><I
1101 CLASS="FIRSTTERM"
1102 >cleanup</I
1103 >: A script to clean up log
1104 files in /var/log</A
1105 ></DT
1106 ><DT
1107 >2-2. <A
1108 HREF="sha-bang.html#EX1A"
1109 ><I
1110 CLASS="FIRSTTERM"
1111 >cleanup</I
1112 >: An improved clean-up
1113 script</A
1114 ></DT
1115 ><DT
1116 >2-3. <A
1117 HREF="sha-bang.html#EX2"
1118 ><I
1119 CLASS="FIRSTTERM"
1120 >cleanup</I
1121 >: An enhanced
1122 and generalized version of above scripts.</A
1123 ></DT
1124 ><DT
1125 >3-1. <A
1126 HREF="special-chars.html#EX8"
1127 >Code blocks and I/O redirection</A
1128 ></DT
1129 ><DT
1130 >3-2. <A
1131 HREF="special-chars.html#RPMCHECK"
1132 >Saving the output of a code block to a file</A
1133 ></DT
1134 ><DT
1135 >3-3. <A
1136 HREF="special-chars.html#BGLOOP"
1137 >Running a loop in the background</A
1138 ></DT
1139 ><DT
1140 >3-4. <A
1141 HREF="special-chars.html#EX58"
1142 >Backup of all files changed in last day</A
1143 ></DT
1144 ><DT
1145 >4-1. <A
1146 HREF="variables.html#EX9"
1147 >Variable assignment and substitution</A
1148 ></DT
1149 ><DT
1150 >4-2. <A
1151 HREF="varassignment.html#EX15"
1152 >Plain Variable Assignment</A
1153 ></DT
1154 ><DT
1155 >4-3. <A
1156 HREF="varassignment.html#EX16"
1157 >Variable Assignment, plain and fancy</A
1158 ></DT
1159 ><DT
1160 >4-4. <A
1161 HREF="untyped.html#INTORSTRING"
1162 >Integer or string?</A
1163 ></DT
1164 ><DT
1165 >4-5. <A
1166 HREF="othertypesv.html#EX17"
1167 >Positional Parameters</A
1168 ></DT
1169 ><DT
1170 >4-6. <A
1171 HREF="othertypesv.html#EX18"
1172 ><I
1173 CLASS="FIRSTTERM"
1174 >wh</I
1175 >, <I
1176 CLASS="FIRSTTERM"
1177 > whois</I
1178 > domain name lookup</A
1179 ></DT
1180 ><DT
1181 >4-7. <A
1182 HREF="othertypesv.html#EX19"
1183 >Using <I
1184 CLASS="FIRSTTERM"
1185 >shift</I
1186 ></A
1187 ></DT
1188 ><DT
1189 >5-1. <A
1190 HREF="quoting.html#WEIRDVARS"
1191 >Echoing Weird Variables</A
1192 ></DT
1193 ><DT
1194 >5-2. <A
1195 HREF="escapingsection.html#ESCAPED"
1196 >Escaped Characters</A
1197 ></DT
1198 ><DT
1199 >5-3. <A
1200 HREF="escapingsection.html#BASHEK"
1201 >Detecting key-presses</A
1202 ></DT
1203 ><DT
1204 >6-1. <A
1205 HREF="exit-status.html#EX5"
1206 >exit / exit status</A
1207 ></DT
1208 ><DT
1209 >6-2. <A
1210 HREF="exit-status.html#NEGCOND"
1211 >Negating a condition using <SPAN
1212 CLASS="TOKEN"
1213 >!</SPAN
1214 ></A
1215 ></DT
1216 ><DT
1217 >7-1. <A
1218 HREF="tests.html#EX10"
1219 >What is truth?</A
1220 ></DT
1221 ><DT
1222 >7-2. <A
1223 HREF="tests.html#EX11"
1224 >Equivalence of <I
1225 CLASS="FIRSTTERM"
1226 >test</I
1227 >,
1228 <TT
1229 CLASS="FILENAME"
1230 >/usr/bin/test</TT
1231 >, <SPAN
1232 CLASS="TOKEN"
1233 >[ ]</SPAN
1234 >,
1235 and <TT
1236 CLASS="FILENAME"
1237 >/usr/bin/[</TT
1238 ></A
1239 ></DT
1240 ><DT
1241 >7-3. <A
1242 HREF="tests.html#ARITHTESTS"
1243 >Arithmetic Tests using <SPAN
1244 CLASS="TOKEN"
1245 >(( ))</SPAN
1246 ></A
1247 ></DT
1248 ><DT
1249 >7-4. <A
1250 HREF="fto.html#BROKENLINK"
1251 >Testing for broken links</A
1252 ></DT
1253 ><DT
1254 >7-5. <A
1255 HREF="comparison-ops.html#EX13"
1256 >Arithmetic and string comparisons</A
1257 ></DT
1258 ><DT
1259 >7-6. <A
1260 HREF="comparison-ops.html#STRTEST"
1261 >Testing whether a string is <I
1262 CLASS="FIRSTTERM"
1263 >null</I
1264 ></A
1265 ></DT
1266 ><DT
1267 >7-7. <A
1268 HREF="comparison-ops.html#EX14"
1269 ><I
1270 CLASS="FIRSTTERM"
1271 >zmore</I
1272 ></A
1273 ></DT
1274 ><DT
1275 >8-1. <A
1276 HREF="operations.html#GCD"
1277 >Greatest common divisor</A
1278 ></DT
1279 ><DT
1280 >8-2. <A
1281 HREF="operations.html#ARITHOPS"
1282 >Using Arithmetic Operations</A
1283 ></DT
1284 ><DT
1285 >8-3. <A
1286 HREF="operations.html#ANDOR"
1287 >Compound Condition Tests Using &#38;&#38; and ||</A
1288 ></DT
1289 ><DT
1290 >8-4. <A
1291 HREF="numerical-constants.html#NUMBERS"
1292 >Representation of numerical constants</A
1293 ></DT
1294 ><DT
1295 >8-5. <A
1296 HREF="dblparens.html#CVARS"
1297 >C-style manipulation of variables</A
1298 ></DT
1299 ><DT
1300 >9-1. <A
1301 HREF="variables2.html#IFSH"
1302 >$IFS and whitespace</A
1303 ></DT
1304 ><DT
1305 >9-2. <A
1306 HREF="variables2.html#TMDIN"
1307 >Timed Input</A
1308 ></DT
1309 ><DT
1310 >9-3. <A
1311 HREF="variables2.html#TIMEOUT"
1312 >Once more, timed input</A
1313 ></DT
1314 ><DT
1315 >9-4. <A
1316 HREF="variables2.html#TOUT"
1317 >Timed <I
1318 CLASS="FIRSTTERM"
1319 >read</I
1320 ></A
1321 ></DT
1322 ><DT
1323 >9-5. <A
1324 HREF="variables2.html#AMIROOT"
1325 >Am I root?</A
1326 ></DT
1327 ><DT
1328 >9-6. <A
1329 HREF="variables2.html#ARGLIST"
1330 ><I
1331 CLASS="FIRSTTERM"
1332 >arglist</I
1333 >: Listing arguments
1334 with $* and $@</A
1335 ></DT
1336 ><DT
1337 >9-7. <A
1338 HREF="variables2.html#INCOMPAT"
1339 >Inconsistent <TT
1340 CLASS="VARNAME"
1341 >$*</TT
1342 > and <TT
1343 CLASS="VARNAME"
1344 >$@</TT
1345 > behavior</A
1346 ></DT
1347 ><DT
1348 >9-8. <A
1349 HREF="variables2.html#IFSEMPTY"
1350 ><TT
1351 CLASS="VARNAME"
1352 >$*</TT
1353 > and <TT
1354 CLASS="VARNAME"
1355 >$@</TT
1356 > when
1357 <TT
1358 CLASS="VARNAME"
1359 >$IFS</TT
1360 > is empty</A
1361 ></DT
1362 ><DT
1363 >9-9. <A
1364 HREF="variables2.html#USCREF"
1365 >Underscore variable</A
1366 ></DT
1367 ><DT
1368 >9-10. <A
1369 HREF="declareref.html#EX20"
1370 >Using <I
1371 CLASS="FIRSTTERM"
1372 >declare</I
1373 > to type variables</A
1374 ></DT
1375 ><DT
1376 >9-11. <A
1377 HREF="randomvar.html#EX21"
1378 >Generating random numbers</A
1379 ></DT
1380 ><DT
1381 >9-12. <A
1382 HREF="randomvar.html#PICKCARD"
1383 >Picking a random card from a deck</A
1384 ></DT
1385 ><DT
1386 >9-13. <A
1387 HREF="randomvar.html#BROWNIAN"
1388 >Brownian Motion Simulation</A
1389 ></DT
1390 ><DT
1391 >9-14. <A
1392 HREF="randomvar.html#RANDOMBETWEEN"
1393 >Random between values</A
1394 ></DT
1395 ><DT
1396 >9-15. <A
1397 HREF="randomvar.html#RANDOMTEST"
1398 >Rolling a single die with RANDOM</A
1399 ></DT
1400 ><DT
1401 >9-16. <A
1402 HREF="randomvar.html#SEEDINGRANDOM"
1403 >Reseeding RANDOM</A
1404 ></DT
1405 ><DT
1406 >9-17. <A
1407 HREF="randomvar.html#RANDOM2"
1408 >Pseudorandom numbers, using <A
1409 HREF="awk.html#AWKREF"
1410 >awk</A
1411 ></A
1412 ></DT
1413 ><DT
1414 >10-1. <A
1415 HREF="manipulatingvars.html#PARAGRAPHSPACE"
1416 >Inserting a blank line between paragraphs in a text file</A
1417 ></DT
1418 ><DT
1419 >10-2. <A
1420 HREF="manipulatingvars.html#RANDSTRING"
1421 >Generating an 8-character <SPAN
1422 CLASS="QUOTE"
1423 >"random"</SPAN
1424 >
1425 string</A
1426 ></DT
1427 ><DT
1428 >10-3. <A
1429 HREF="manipulatingvars.html#CVT"
1430 >Converting graphic file formats, with filename change</A
1431 ></DT
1432 ><DT
1433 >10-4. <A
1434 HREF="manipulatingvars.html#RA2OGG"
1435 >Converting streaming audio files to
1436 <I
1437 CLASS="FIRSTTERM"
1438 >ogg</I
1439 ></A
1440 ></DT
1441 ><DT
1442 >10-5. <A
1443 HREF="manipulatingvars.html#GETOPTSIMPLE"
1444 >Emulating <I
1445 CLASS="FIRSTTERM"
1446 >getopt</I
1447 ></A
1448 ></DT
1449 ><DT
1450 >10-6. <A
1451 HREF="manipulatingvars.html#SUBSTRINGEX"
1452 >Alternate ways of extracting and locating substrings</A
1453 ></DT
1454 ><DT
1455 >10-7. <A
1456 HREF="parameter-substitution.html#EX6"
1457 >Using parameter substitution and error messages</A
1458 ></DT
1459 ><DT
1460 >10-8. <A
1461 HREF="parameter-substitution.html#USAGEMESSAGE"
1462 >Parameter substitution and <SPAN
1463 CLASS="QUOTE"
1464 >"usage"</SPAN
1465 > messages</A
1466 ></DT
1467 ><DT
1468 >10-9. <A
1469 HREF="parameter-substitution.html#LENGTH"
1470 >Length of a variable</A
1471 ></DT
1472 ><DT
1473 >10-10. <A
1474 HREF="parameter-substitution.html#PATTMATCHING"
1475 >Pattern matching in parameter substitution</A
1476 ></DT
1477 ><DT
1478 >10-11. <A
1479 HREF="parameter-substitution.html#RFE"
1480 >Renaming file extensions<SPAN
1481 CLASS="TOKEN"
1482 >:</SPAN
1483 ></A
1484 ></DT
1485 ><DT
1486 >10-12. <A
1487 HREF="parameter-substitution.html#EX7"
1488 >Using pattern matching to parse arbitrary strings</A
1489 ></DT
1490 ><DT
1491 >10-13. <A
1492 HREF="parameter-substitution.html#VARMATCH"
1493 >Matching patterns at prefix or suffix of string</A
1494 ></DT
1495 ><DT
1496 >11-1. <A
1497 HREF="loops.html#EX22"
1498 >Simple <I
1499 CLASS="FIRSTTERM"
1500 >for</I
1501 > loops</A
1502 ></DT
1503 ><DT
1504 >11-2. <A
1505 HREF="loops.html#EX22A"
1506 ><I
1507 CLASS="FIRSTTERM"
1508 >for</I
1509 > loop with two parameters in each
1510 [list] element</A
1511 ></DT
1512 ><DT
1513 >11-3. <A
1514 HREF="loops.html#FILEINFO"
1515 ><SPAN
1516 CLASS="emphasis"
1517 ><I
1518 CLASS="EMPHASIS"
1519 >Fileinfo:</I
1520 ></SPAN
1521 > operating on a file list
1522 contained in a variable</A
1523 ></DT
1524 ><DT
1525 >11-4. <A
1526 HREF="loops.html#FILEINFO01"
1527 >Operating on a parameterized file list</A
1528 ></DT
1529 ><DT
1530 >11-5. <A
1531 HREF="loops.html#LISTGLOB"
1532 >Operating on files with a <I
1533 CLASS="FIRSTTERM"
1534 >for</I
1535 > loop</A
1536 ></DT
1537 ><DT
1538 >11-6. <A
1539 HREF="loops.html#EX23"
1540 >Missing <TT
1541 CLASS="USERINPUT"
1542 ><B
1543 >in [list]</B
1544 ></TT
1545 > in a
1546 <I
1547 CLASS="FIRSTTERM"
1548 >for</I
1549 > loop</A
1550 ></DT
1551 ><DT
1552 >11-7. <A
1553 HREF="loops.html#FORLOOPCMD"
1554 >Generating the <TT
1555 CLASS="USERINPUT"
1556 ><B
1557 >[list]</B
1558 ></TT
1559 > in
1560 a <I
1561 CLASS="FIRSTTERM"
1562 >for</I
1563 > loop with command substitution</A
1564 ></DT
1565 ><DT
1566 >11-8. <A
1567 HREF="loops.html#BINGREP"
1568 >A <I
1569 CLASS="FIRSTTERM"
1570 >grep</I
1571 > replacement
1572 for binary files</A
1573 ></DT
1574 ><DT
1575 >11-9. <A
1576 HREF="loops.html#USERLIST"
1577 >Listing all users on the system</A
1578 ></DT
1579 ><DT
1580 >11-10. <A
1581 HREF="loops.html#FINDSTRING"
1582 >Checking all the binaries in a directory for
1583 authorship</A
1584 ></DT
1585 ><DT
1586 >11-11. <A
1587 HREF="loops.html#SYMLINKS"
1588 >Listing the <I
1589 CLASS="FIRSTTERM"
1590 >symbolic
1591 links</I
1592 > in a directory</A
1593 ></DT
1594 ><DT
1595 >11-12. <A
1596 HREF="loops.html#SYMLINKS2"
1597 >Symbolic links in a directory, saved to a file</A
1598 ></DT
1599 ><DT
1600 >11-13. <A
1601 HREF="loops.html#FORLOOPC"
1602 >A C-style <I
1603 CLASS="FIRSTTERM"
1604 >for</I
1605 > loop</A
1606 ></DT
1607 ><DT
1608 >11-14. <A
1609 HREF="loops.html#EX24"
1610 >Using <I
1611 CLASS="FIRSTTERM"
1612 >efax</I
1613 > in batch mode</A
1614 ></DT
1615 ><DT
1616 >11-15. <A
1617 HREF="loops.html#EX25"
1618 >Simple <I
1619 CLASS="FIRSTTERM"
1620 >while</I
1621 > loop</A
1622 ></DT
1623 ><DT
1624 >11-16. <A
1625 HREF="loops.html#EX26"
1626 >Another <I
1627 CLASS="FIRSTTERM"
1628 >while</I
1629 > loop</A
1630 ></DT
1631 ><DT
1632 >11-17. <A
1633 HREF="loops.html#EX26A"
1634 ><I
1635 CLASS="FIRSTTERM"
1636 >while</I
1637 > loop with multiple conditions</A
1638 ></DT
1639 ><DT
1640 >11-18. <A
1641 HREF="loops.html#WHLOOPC"
1642 >C-style syntax in a <I
1643 CLASS="FIRSTTERM"
1644 >while</I
1645 > loop</A
1646 ></DT
1647 ><DT
1648 >11-19. <A
1649 HREF="loops.html#EX27"
1650 ><I
1651 CLASS="FIRSTTERM"
1652 >until</I
1653 > loop</A
1654 ></DT
1655 ><DT
1656 >11-20. <A
1657 HREF="nestedloops.html#NESTEDLOOP"
1658 >Nested Loop</A
1659 ></DT
1660 ><DT
1661 >11-21. <A
1662 HREF="loopcontrol.html#EX28"
1663 >Effects of <I
1664 CLASS="FIRSTTERM"
1665 >break</I
1666 > and
1667 <B
1668 CLASS="COMMAND"
1669 >continue</B
1670 > in a loop</A
1671 ></DT
1672 ><DT
1673 >11-22. <A
1674 HREF="loopcontrol.html#BREAKLEVELS"
1675 >Breaking out of multiple loop levels</A
1676 ></DT
1677 ><DT
1678 >11-23. <A
1679 HREF="loopcontrol.html#CONTINUELEVELS"
1680 >Continuing at a higher loop level</A
1681 ></DT
1682 ><DT
1683 >11-24. <A
1684 HREF="loopcontrol.html#CONTINUENEX"
1685 >Using <I
1686 CLASS="FIRSTTERM"
1687 >continue N</I
1688 > in an actual task</A
1689 ></DT
1690 ><DT
1691 >11-25. <A
1692 HREF="testbranch.html#EX29"
1693 >Using <I
1694 CLASS="FIRSTTERM"
1695 >case</I
1696 ></A
1697 ></DT
1698 ><DT
1699 >11-26. <A
1700 HREF="testbranch.html#EX30"
1701 >Creating menus using <I
1702 CLASS="FIRSTTERM"
1703 >case</I
1704 ></A
1705 ></DT
1706 ><DT
1707 >11-27. <A
1708 HREF="testbranch.html#CASECMD"
1709 >Using <I
1710 CLASS="FIRSTTERM"
1711 >command substitution</I
1712 >
1713 to generate the <I
1714 CLASS="FIRSTTERM"
1715 >case</I
1716 > variable</A
1717 ></DT
1718 ><DT
1719 >11-28. <A
1720 HREF="testbranch.html#MATCHSTRING"
1721 >Simple string matching</A
1722 ></DT
1723 ><DT
1724 >11-29. <A
1725 HREF="testbranch.html#ISALPHA"
1726 >Checking for alphabetic input</A
1727 ></DT
1728 ><DT
1729 >11-30. <A
1730 HREF="testbranch.html#EX31"
1731 >Creating menus using <I
1732 CLASS="FIRSTTERM"
1733 >select</I
1734 ></A
1735 ></DT
1736 ><DT
1737 >11-31. <A
1738 HREF="testbranch.html#EX32"
1739 >Creating menus using <I
1740 CLASS="FIRSTTERM"
1741 >select</I
1742 >
1743 in a function</A
1744 ></DT
1745 ><DT
1746 >12-1. <A
1747 HREF="commandsub.html#STUPSCR"
1748 >Stupid script tricks</A
1749 ></DT
1750 ><DT
1751 >12-2. <A
1752 HREF="commandsub.html#CSUBLOOP"
1753 >Generating a variable from a loop</A
1754 ></DT
1755 ><DT
1756 >12-3. <A
1757 HREF="commandsub.html#AGRAM2"
1758 >Finding anagrams</A
1759 ></DT
1760 ><DT
1761 >15-1. <A
1762 HREF="internal.html#SPAWNSCR"
1763 >A script that spawns multiple instances of itself</A
1764 ></DT
1765 ><DT
1766 >15-2. <A
1767 HREF="internal.html#EX47"
1768 ><I
1769 CLASS="FIRSTTERM"
1770 >printf</I
1771 > in action</A
1772 ></DT
1773 ><DT
1774 >15-3. <A
1775 HREF="internal.html#EX36"
1776 >Variable assignment, using <I
1777 CLASS="FIRSTTERM"
1778 >read</I
1779 ></A
1780 ></DT
1781 ><DT
1782 >15-4. <A
1783 HREF="internal.html#READNOVAR"
1784 >What happens when <I
1785 CLASS="FIRSTTERM"
1786 >read</I
1787 > has no
1788 variable</A
1789 ></DT
1790 ><DT
1791 >15-5. <A
1792 HREF="internal.html#READR"
1793 >Multi-line input to <I
1794 CLASS="FIRSTTERM"
1795 >read</I
1796 ></A
1797 ></DT
1798 ><DT
1799 >15-6. <A
1800 HREF="internal.html#ARROWDETECT"
1801 >Detecting the arrow keys</A
1802 ></DT
1803 ><DT
1804 >15-7. <A
1805 HREF="internal.html#READREDIR"
1806 >Using <I
1807 CLASS="FIRSTTERM"
1808 >read</I
1809 > with
1810 <A
1811 HREF="io-redirection.html#IOREDIRREF"
1812 >file redirection</A
1813 ></A
1814 ></DT
1815 ><DT
1816 >15-8. <A
1817 HREF="internal.html#READPIPE"
1818 >Problems reading from a pipe</A
1819 ></DT
1820 ><DT
1821 >15-9. <A
1822 HREF="internal.html#EX37"
1823 >Changing the current working directory</A
1824 ></DT
1825 ><DT
1826 >15-10. <A
1827 HREF="internal.html#EX46"
1828 >Letting <I
1829 CLASS="FIRSTTERM"
1830 >let</I
1831 > do arithmetic.</A
1832 ></DT
1833 ><DT
1834 >15-11. <A
1835 HREF="internal.html#EX43"
1836 >Showing the effect of <I
1837 CLASS="FIRSTTERM"
1838 >eval</I
1839 ></A
1840 ></DT
1841 ><DT
1842 >15-12. <A
1843 HREF="internal.html#ARRCHOICE"
1844 >Using <I
1845 CLASS="FIRSTTERM"
1846 >eval</I
1847 > to select
1848 among variables</A
1849 ></DT
1850 ><DT
1851 >15-13. <A
1852 HREF="internal.html#ECHOPARAMS"
1853 ><I
1854 CLASS="FIRSTTERM"
1855 >Echoing</I
1856 > the
1857 <I
1858 CLASS="FIRSTTERM"
1859 >command-line parameters</I
1860 ></A
1861 ></DT
1862 ><DT
1863 >15-14. <A
1864 HREF="internal.html#EX44"
1865 >Forcing a log-off</A
1866 ></DT
1867 ><DT
1868 >15-15. <A
1869 HREF="internal.html#ROT14"
1870 >A version of <I
1871 CLASS="FIRSTTERM"
1872 >rot13</I
1873 ></A
1874 ></DT
1875 ><DT
1876 >15-16. <A
1877 HREF="internal.html#EX34"
1878 >Using <I
1879 CLASS="FIRSTTERM"
1880 >set</I
1881 > with positional
1882 parameters</A
1883 ></DT
1884 ><DT
1885 >15-17. <A
1886 HREF="internal.html#REVPOSPARAMS"
1887 >Reversing the positional parameters</A
1888 ></DT
1889 ><DT
1890 >15-18. <A
1891 HREF="internal.html#SETPOS"
1892 >Reassigning the positional parameters</A
1893 ></DT
1894 ><DT
1895 >15-19. <A
1896 HREF="internal.html#UNS"
1897 ><SPAN
1898 CLASS="QUOTE"
1899 >"Unsetting"</SPAN
1900 > a variable</A
1901 ></DT
1902 ><DT
1903 >15-20. <A
1904 HREF="internal.html#COLTOTALER3"
1905 >Using <I
1906 CLASS="FIRSTTERM"
1907 >export</I
1908 > to pass a variable to an
1909 embedded <I
1910 CLASS="FIRSTTERM"
1911 >awk</I
1912 > script</A
1913 ></DT
1914 ><DT
1915 >15-21. <A
1916 HREF="internal.html#EX33"
1917 >Using <I
1918 CLASS="FIRSTTERM"
1919 >getopts</I
1920 > to read the
1921 options/arguments passed to a script</A
1922 ></DT
1923 ><DT
1924 >15-22. <A
1925 HREF="internal.html#EX38"
1926 ><SPAN
1927 CLASS="QUOTE"
1928 >"Including"</SPAN
1929 > a data file</A
1930 ></DT
1931 ><DT
1932 >15-23. <A
1933 HREF="internal.html#SELFSOURCE"
1934 >A (useless) script that sources itself</A
1935 ></DT
1936 ><DT
1937 >15-24. <A
1938 HREF="internal.html#EX54"
1939 >Effects of <I
1940 CLASS="FIRSTTERM"
1941 >exec</I
1942 ></A
1943 ></DT
1944 ><DT
1945 >15-25. <A
1946 HREF="internal.html#SELFEXEC"
1947 >A script that <I
1948 CLASS="FIRSTTERM"
1949 >exec's</I
1950 > itself</A
1951 ></DT
1952 ><DT
1953 >15-26. <A
1954 HREF="internal.html#EX39"
1955 >Waiting for a process to finish before proceeding</A
1956 ></DT
1957 ><DT
1958 >15-27. <A
1959 HREF="internal.html#SELFDESTRUCT"
1960 >A script that kills itself</A
1961 ></DT
1962 ><DT
1963 >16-1. <A
1964 HREF="external.html#EX40"
1965 >Using <I
1966 CLASS="FIRSTTERM"
1967 >ls</I
1968 > to create a table of contents
1969 for burning a <SPAN
1970 CLASS="ABBREV"
1971 >CDR</SPAN
1972 > disk</A
1973 ></DT
1974 ><DT
1975 >16-2. <A
1976 HREF="external.html#HELLOL"
1977 >Hello or Good-bye</A
1978 ></DT
1979 ><DT
1980 >16-3. <A
1981 HREF="moreadv.html#EX57"
1982 ><I
1983 CLASS="FIRSTTERM"
1984 >Badname</I
1985 >, eliminate file names
1986 in current directory containing bad characters and <A
1987 HREF="special-chars.html#WHITESPACEREF"
1988 >whitespace</A
1989 >.</A
1990 ></DT
1991 ><DT
1992 >16-4. <A
1993 HREF="moreadv.html#IDELETE"
1994 >Deleting a file by its <I
1995 CLASS="FIRSTTERM"
1996 >inode</I
1997 >
1998 number</A
1999 ></DT
2000 ><DT
2001 >16-5. <A
2002 HREF="moreadv.html#EX41"
2003 >Logfile: Using <I
2004 CLASS="FIRSTTERM"
2005 >xargs</I
2006 > to monitor system log</A
2007 ></DT
2008 ><DT
2009 >16-6. <A
2010 HREF="moreadv.html#EX42"
2011 >Copying files in current directory to another</A
2012 ></DT
2013 ><DT
2014 >16-7. <A
2015 HREF="moreadv.html#KILLBYNAME"
2016 >Killing processes by name</A
2017 ></DT
2018 ><DT
2019 >16-8. <A
2020 HREF="moreadv.html#WF2"
2021 >Word frequency analysis using
2022 <I
2023 CLASS="FIRSTTERM"
2024 >xargs</I
2025 ></A
2026 ></DT
2027 ><DT
2028 >16-9. <A
2029 HREF="moreadv.html#EX45"
2030 >Using <I
2031 CLASS="FIRSTTERM"
2032 >expr</I
2033 ></A
2034 ></DT
2035 ><DT
2036 >16-10. <A
2037 HREF="timedate.html#EX51"
2038 >Using <I
2039 CLASS="FIRSTTERM"
2040 >date</I
2041 ></A
2042 ></DT
2043 ><DT
2044 >16-11. <A
2045 HREF="timedate.html#DATECALC"
2046 ><I
2047 CLASS="FIRSTTERM"
2048 >Date</I
2049 > calculations</A
2050 ></DT
2051 ><DT
2052 >16-12. <A
2053 HREF="textproc.html#WF"
2054 >Word Frequency Analysis</A
2055 ></DT
2056 ><DT
2057 >16-13. <A
2058 HREF="textproc.html#SCRIPTDETECTOR"
2059 >Which files are scripts?</A
2060 ></DT
2061 ><DT
2062 >16-14. <A
2063 HREF="textproc.html#RND"
2064 >Generating 10-digit random numbers</A
2065 ></DT
2066 ><DT
2067 >16-15. <A
2068 HREF="textproc.html#EX12"
2069 >Using <I
2070 CLASS="FIRSTTERM"
2071 >tail</I
2072 > to monitor the system log</A
2073 ></DT
2074 ><DT
2075 >16-16. <A
2076 HREF="textproc.html#FROMSH"
2077 >Printing out the <I
2078 CLASS="FIRSTTERM"
2079 >From</I
2080 > lines in
2081 stored e-mail messages</A
2082 ></DT
2083 ><DT
2084 >16-17. <A
2085 HREF="textproc.html#GRP"
2086 >Emulating <I
2087 CLASS="FIRSTTERM"
2088 >grep</I
2089 > in a script</A
2090 ></DT
2091 ><DT
2092 >16-18. <A
2093 HREF="textproc.html#CWSOLVER"
2094 >Crossword puzzle solver</A
2095 ></DT
2096 ><DT
2097 >16-19. <A
2098 HREF="textproc.html#DICTLOOKUP"
2099 >Looking up definitions in Webster's 1913 Dictionary</A
2100 ></DT
2101 ><DT
2102 >16-20. <A
2103 HREF="textproc.html#LOOKUP"
2104 >Checking words in a list for validity</A
2105 ></DT
2106 ><DT
2107 >16-21. <A
2108 HREF="textproc.html#EX49"
2109 ><I
2110 CLASS="FIRSTTERM"
2111 >toupper</I
2112 >: Transforms a file
2113 to all uppercase.</A
2114 ></DT
2115 ><DT
2116 >16-22. <A
2117 HREF="textproc.html#LOWERCASE"
2118 ><I
2119 CLASS="FIRSTTERM"
2120 >lowercase</I
2121 >: Changes all
2122 filenames in working directory to lowercase.</A
2123 ></DT
2124 ><DT
2125 >16-23. <A
2126 HREF="textproc.html#DU"
2127 ><I
2128 CLASS="FIRSTTERM"
2129 >du</I
2130 >: DOS to UNIX text file conversion.</A
2131 ></DT
2132 ><DT
2133 >16-24. <A
2134 HREF="textproc.html#ROT13"
2135 ><I
2136 CLASS="FIRSTTERM"
2137 >rot13</I
2138 >: ultra-weak encryption.</A
2139 ></DT
2140 ><DT
2141 >16-25. <A
2142 HREF="textproc.html#CRYPTOQUOTE"
2143 >Generating <SPAN
2144 CLASS="QUOTE"
2145 >"Crypto-Quote"</SPAN
2146 > Puzzles</A
2147 ></DT
2148 ><DT
2149 >16-26. <A
2150 HREF="textproc.html#EX50"
2151 >Formatted file listing.</A
2152 ></DT
2153 ><DT
2154 >16-27. <A
2155 HREF="textproc.html#COL"
2156 >Using <I
2157 CLASS="FIRSTTERM"
2158 >column</I
2159 > to format a directory
2160 listing</A
2161 ></DT
2162 ><DT
2163 >16-28. <A
2164 HREF="textproc.html#LNUM"
2165 ><I
2166 CLASS="FIRSTTERM"
2167 >nl</I
2168 >: A self-numbering script.</A
2169 ></DT
2170 ><DT
2171 >16-29. <A
2172 HREF="textproc.html#MANVIEW"
2173 ><I
2174 CLASS="FIRSTTERM"
2175 >manview</I
2176 >: Viewing formatted manpages</A
2177 ></DT
2178 ><DT
2179 >16-30. <A
2180 HREF="filearchiv.html#EX48"
2181 >Using <I
2182 CLASS="FIRSTTERM"
2183 >cpio</I
2184 > to move a directory tree</A
2185 ></DT
2186 ><DT
2187 >16-31. <A
2188 HREF="filearchiv.html#DERPM"
2189 >Unpacking an <I
2190 CLASS="FIRSTTERM"
2191 >rpm</I
2192 > archive</A
2193 ></DT
2194 ><DT
2195 >16-32. <A
2196 HREF="filearchiv.html#STRIPC"
2197 >Stripping comments from C program files</A
2198 ></DT
2199 ><DT
2200 >16-33. <A
2201 HREF="filearchiv.html#WHAT"
2202 >Exploring <TT
2203 CLASS="FILENAME"
2204 >/usr/X11R6/bin</TT
2205 ></A
2206 ></DT
2207 ><DT
2208 >16-34. <A
2209 HREF="filearchiv.html#WSTRINGS"
2210 >An <SPAN
2211 CLASS="QUOTE"
2212 >"improved"</SPAN
2213 >
2214 <I
2215 CLASS="FIRSTTERM"
2216 >strings</I
2217 > command</A
2218 ></DT
2219 ><DT
2220 >16-35. <A
2221 HREF="filearchiv.html#FILECOMP"
2222 >Using <I
2223 CLASS="FIRSTTERM"
2224 >cmp</I
2225 > to compare two files
2226 within a script.</A
2227 ></DT
2228 ><DT
2229 >16-36. <A
2230 HREF="filearchiv.html#EX35"
2231 ><I
2232 CLASS="FIRSTTERM"
2233 >basename</I
2234 > and
2235 <I
2236 CLASS="FIRSTTERM"
2237 >dirname</I
2238 ></A
2239 ></DT
2240 ><DT
2241 >16-37. <A
2242 HREF="filearchiv.html#SPLITCOPY"
2243 >A script that copies itself in sections</A
2244 ></DT
2245 ><DT
2246 >16-38. <A
2247 HREF="filearchiv.html#FILEINTEGRITY"
2248 >Checking file integrity</A
2249 ></DT
2250 ><DT
2251 >16-39. <A
2252 HREF="filearchiv.html#EX52"
2253 >Uudecoding encoded files</A
2254 ></DT
2255 ><DT
2256 >16-40. <A
2257 HREF="communications.html#SPAMLOOKUP"
2258 >Finding out where to report a spammer</A
2259 ></DT
2260 ><DT
2261 >16-41. <A
2262 HREF="communications.html#ISSPAMMER"
2263 >Analyzing a spam domain</A
2264 ></DT
2265 ><DT
2266 >16-42. <A
2267 HREF="communications.html#QUOTEFETCH"
2268 >Getting a stock quote</A
2269 ></DT
2270 ><DT
2271 >16-43. <A
2272 HREF="communications.html#FC4UPD"
2273 >Updating FC4</A
2274 ></DT
2275 ><DT
2276 >16-44. <A
2277 HREF="communications.html#REMOTE"
2278 >Using <I
2279 CLASS="FIRSTTERM"
2280 >ssh</I
2281 ></A
2282 ></DT
2283 ><DT
2284 >16-45. <A
2285 HREF="communications.html#SELFMAILER"
2286 >A script that mails itself</A
2287 ></DT
2288 ><DT
2289 >16-46. <A
2290 HREF="mathc.html#PRIMES2"
2291 >Generating prime numbers</A
2292 ></DT
2293 ><DT
2294 >16-47. <A
2295 HREF="mathc.html#MONTHLYPMT"
2296 >Monthly Payment on a Mortgage</A
2297 ></DT
2298 ><DT
2299 >16-48. <A
2300 HREF="mathc.html#BASE"
2301 >Base Conversion</A
2302 ></DT
2303 ><DT
2304 >16-49. <A
2305 HREF="mathc.html#ALTBC"
2306 >Invoking <I
2307 CLASS="FIRSTTERM"
2308 >bc</I
2309 > using a <I
2310 CLASS="FIRSTTERM"
2311 >here
2312 document</I
2313 ></A
2314 ></DT
2315 ><DT
2316 >16-50. <A
2317 HREF="mathc.html#CANNON"
2318 >Calculating PI</A
2319 ></DT
2320 ><DT
2321 >16-51. <A
2322 HREF="mathc.html#HEXCONVERT"
2323 >Converting a decimal number to hexadecimal</A
2324 ></DT
2325 ><DT
2326 >16-52. <A
2327 HREF="mathc.html#FACTR"
2328 >Factoring</A
2329 ></DT
2330 ><DT
2331 >16-53. <A
2332 HREF="mathc.html#HYPOT"
2333 >Calculating the hypotenuse of a triangle</A
2334 ></DT
2335 ><DT
2336 >16-54. <A
2337 HREF="extmisc.html#EX53"
2338 >Using <I
2339 CLASS="FIRSTTERM"
2340 >seq</I
2341 > to generate loop
2342 arguments</A
2343 ></DT
2344 ><DT
2345 >16-55. <A
2346 HREF="extmisc.html#LETTERCOUNT"
2347 >Letter Count"</A
2348 ></DT
2349 ><DT
2350 >16-56. <A
2351 HREF="extmisc.html#EX33A"
2352 >Using <I
2353 CLASS="FIRSTTERM"
2354 >getopt</I
2355 > to parse command-line
2356 options</A
2357 ></DT
2358 ><DT
2359 >16-57. <A
2360 HREF="extmisc.html#SELFCOPY"
2361 >A script that copies itself</A
2362 ></DT
2363 ><DT
2364 >16-58. <A
2365 HREF="extmisc.html#EXERCISINGDD"
2366 >Exercising <I
2367 CLASS="FIRSTTERM"
2368 >dd</I
2369 ></A
2370 ></DT
2371 ><DT
2372 >16-59. <A
2373 HREF="extmisc.html#DDKEYPRESS"
2374 >Capturing Keystrokes</A
2375 ></DT
2376 ><DT
2377 >16-60. <A
2378 HREF="extmisc.html#RPSDCARD"
2379 >Preparing a bootable SD card for the
2380 <SPAN
2381 CLASS="emphasis"
2382 ><I
2383 CLASS="EMPHASIS"
2384 >Raspberry Pi</I
2385 ></SPAN
2386 ></A
2387 ></DT
2388 ><DT
2389 >16-61. <A
2390 HREF="extmisc.html#BLOTOUT"
2391 >Securely deleting a file</A
2392 ></DT
2393 ><DT
2394 >16-62. <A
2395 HREF="extmisc.html#TEMPFILENAME"
2396 >Filename generator</A
2397 ></DT
2398 ><DT
2399 >16-63. <A
2400 HREF="extmisc.html#UNITCONVERSION"
2401 >Converting meters to miles</A
2402 ></DT
2403 ><DT
2404 >16-64. <A
2405 HREF="extmisc.html#M4"
2406 >Using <I
2407 CLASS="FIRSTTERM"
2408 >m4</I
2409 ></A
2410 ></DT
2411 ><DT
2412 >17-1. <A
2413 HREF="system.html#SETNEWPW"
2414 >Setting a new password</A
2415 ></DT
2416 ><DT
2417 >17-2. <A
2418 HREF="system.html#ERASE"
2419 >Setting an <I
2420 CLASS="FIRSTTERM"
2421 >erase</I
2422 > character</A
2423 ></DT
2424 ><DT
2425 >17-3. <A
2426 HREF="system.html#SECRETPW"
2427 ><I
2428 CLASS="FIRSTTERM"
2429 >secret password</I
2430 >:
2431 Turning off terminal echoing</A
2432 ></DT
2433 ><DT
2434 >17-4. <A
2435 HREF="system.html#KEYPRESS"
2436 >Keypress detection</A
2437 ></DT
2438 ><DT
2439 >17-5. <A
2440 HREF="system.html#ISCAN"
2441 >Checking a remote server for
2442 <I
2443 CLASS="FIRSTTERM"
2444 >identd</I
2445 ></A
2446 ></DT
2447 ><DT
2448 >17-6. <A
2449 HREF="system.html#KILLPROCESS"
2450 ><I
2451 CLASS="FIRSTTERM"
2452 >pidof</I
2453 > helps kill a process</A
2454 ></DT
2455 ><DT
2456 >17-7. <A
2457 HREF="system.html#ISOMOUNTREF"
2458 >Checking a CD image</A
2459 ></DT
2460 ><DT
2461 >17-8. <A
2462 HREF="system.html#CREATEFS"
2463 >Creating a filesystem in a file</A
2464 ></DT
2465 ><DT
2466 >17-9. <A
2467 HREF="system.html#ADDDRV"
2468 >Adding a new hard drive</A
2469 ></DT
2470 ><DT
2471 >17-10. <A
2472 HREF="system.html#ROT13A"
2473 >Using <I
2474 CLASS="FIRSTTERM"
2475 >umask</I
2476 > to hide an output file
2477 from prying eyes</A
2478 ></DT
2479 ><DT
2480 >17-11. <A
2481 HREF="system.html#BACKLIGHT"
2482 ><I
2483 CLASS="FIRSTTERM"
2484 >Backlight</I
2485 >: changes
2486 the brightness of the (laptop) screen backlight</A
2487 ></DT
2488 ><DT
2489 >17-12. <A
2490 HREF="system.html#EX55"
2491 ><I
2492 CLASS="FIRSTTERM"
2493 >killall</I
2494 >, from <TT
2495 CLASS="FILENAME"
2496 >/etc/rc.d/init.d</TT
2497 ></A
2498 ></DT
2499 ><DT
2500 >19-1. <A
2501 HREF="here-docs.html#EX70"
2502 ><I
2503 CLASS="FIRSTTERM"
2504 >broadcast</I
2505 >: Sends message to everyone
2506 logged in</A
2507 ></DT
2508 ><DT
2509 >19-2. <A
2510 HREF="here-docs.html#EX69"
2511 ><I
2512 CLASS="FIRSTTERM"
2513 >dummyfile</I
2514 >: Creates a 2-line dummy
2515 file</A
2516 ></DT
2517 ><DT
2518 >19-3. <A
2519 HREF="here-docs.html#EX71"
2520 >Multi-line message using <I
2521 CLASS="FIRSTTERM"
2522 >cat</I
2523 ></A
2524 ></DT
2525 ><DT
2526 >19-4. <A
2527 HREF="here-docs.html#EX71A"
2528 >Multi-line message, with tabs suppressed</A
2529 ></DT
2530 ><DT
2531 >19-5. <A
2532 HREF="here-docs.html#EX71B"
2533 >Here document with replaceable parameters</A
2534 ></DT
2535 ><DT
2536 >19-6. <A
2537 HREF="here-docs.html#EX72"
2538 >Upload a file pair to <I
2539 CLASS="FIRSTTERM"
2540 >Sunsite</I
2541 > incoming
2542 directory</A
2543 ></DT
2544 ><DT
2545 >19-7. <A
2546 HREF="here-docs.html#EX71C"
2547 >Parameter substitution turned off</A
2548 ></DT
2549 ><DT
2550 >19-8. <A
2551 HREF="here-docs.html#GENERATESCRIPT"
2552 >A script that generates another script</A
2553 ></DT
2554 ><DT
2555 >19-9. <A
2556 HREF="here-docs.html#HF"
2557 >Here documents and functions</A
2558 ></DT
2559 ><DT
2560 >19-10. <A
2561 HREF="here-docs.html#ANONHEREDOC"
2562 ><SPAN
2563 CLASS="QUOTE"
2564 >"Anonymous"</SPAN
2565 > Here Document</A
2566 ></DT
2567 ><DT
2568 >19-11. <A
2569 HREF="here-docs.html#COMMENTBLOCK"
2570 >Commenting out a block of code</A
2571 ></DT
2572 ><DT
2573 >19-12. <A
2574 HREF="here-docs.html#SELFDOCUMENT"
2575 >A self-documenting script</A
2576 ></DT
2577 ><DT
2578 >19-13. <A
2579 HREF="here-docs.html#PREPENDEX"
2580 >Prepending a line to a file</A
2581 ></DT
2582 ><DT
2583 >19-14. <A
2584 HREF="here-docs.html#MAILBOXGREP"
2585 >Parsing a mailbox</A
2586 ></DT
2587 ><DT
2588 >20-1. <A
2589 HREF="io-redirection.html#REDIR1"
2590 >Redirecting <TT
2591 CLASS="FILENAME"
2592 >stdin</TT
2593 > using
2594 <I
2595 CLASS="FIRSTTERM"
2596 >exec</I
2597 ></A
2598 ></DT
2599 ><DT
2600 >20-2. <A
2601 HREF="io-redirection.html#REASSIGNSTDOUT"
2602 >Redirecting <TT
2603 CLASS="FILENAME"
2604 >stdout</TT
2605 > using
2606 <I
2607 CLASS="FIRSTTERM"
2608 >exec</I
2609 ></A
2610 ></DT
2611 ><DT
2612 >20-3. <A
2613 HREF="io-redirection.html#UPPERCONV"
2614 >Redirecting both <TT
2615 CLASS="FILENAME"
2616 >stdin</TT
2617 > and
2618 <TT
2619 CLASS="FILENAME"
2620 >stdout</TT
2621 > in the same script with
2622 <I
2623 CLASS="FIRSTTERM"
2624 >exec</I
2625 ></A
2626 ></DT
2627 ><DT
2628 >20-4. <A
2629 HREF="io-redirection.html#AVOIDSUBSHELL"
2630 >Avoiding a subshell</A
2631 ></DT
2632 ><DT
2633 >20-5. <A
2634 HREF="redircb.html#REDIR2"
2635 >Redirected <I
2636 CLASS="FIRSTTERM"
2637 >while</I
2638 > loop</A
2639 ></DT
2640 ><DT
2641 >20-6. <A
2642 HREF="redircb.html#REDIR2A"
2643 >Alternate form of redirected <I
2644 CLASS="FIRSTTERM"
2645 >while</I
2646 > loop</A
2647 ></DT
2648 ><DT
2649 >20-7. <A
2650 HREF="redircb.html#REDIR3"
2651 >Redirected <I
2652 CLASS="FIRSTTERM"
2653 >until</I
2654 > loop</A
2655 ></DT
2656 ><DT
2657 >20-8. <A
2658 HREF="redircb.html#REDIR4"
2659 >Redirected <I
2660 CLASS="FIRSTTERM"
2661 >for</I
2662 > loop</A
2663 ></DT
2664 ><DT
2665 >20-9. <A
2666 HREF="redircb.html#REDIR4A"
2667 >Redirected <I
2668 CLASS="FIRSTTERM"
2669 >for</I
2670 > loop (both
2671 <TT
2672 CLASS="FILENAME"
2673 >stdin</TT
2674 > and <TT
2675 CLASS="FILENAME"
2676 >stdout</TT
2677 >
2678 redirected)</A
2679 ></DT
2680 ><DT
2681 >20-10. <A
2682 HREF="redircb.html#REDIR5"
2683 >Redirected <I
2684 CLASS="FIRSTTERM"
2685 >if/then</I
2686 > test</A
2687 ></DT
2688 ><DT
2689 >20-11. <A
2690 HREF="redircb.html#NAMESDATA"
2691 >Data file <I
2692 CLASS="FIRSTTERM"
2693 >names.data</I
2694 > for above
2695 examples</A
2696 ></DT
2697 ><DT
2698 >20-12. <A
2699 HREF="redirapps.html#LOGEVENTS"
2700 >Logging events</A
2701 ></DT
2702 ><DT
2703 >21-1. <A
2704 HREF="subshells.html#SUBSHELL"
2705 >Variable scope in a subshell</A
2706 ></DT
2707 ><DT
2708 >21-2. <A
2709 HREF="subshells.html#ALLPROFS"
2710 >List User Profiles</A
2711 ></DT
2712 ><DT
2713 >21-3. <A
2714 HREF="subshells.html#PARALLEL-PROCESSES"
2715 >Running parallel processes in subshells</A
2716 ></DT
2717 ><DT
2718 >22-1. <A
2719 HREF="restricted-sh.html#RESTRICTED"
2720 >Running a script in restricted mode</A
2721 ></DT
2722 ><DT
2723 >23-1. <A
2724 HREF="process-sub.html#WRPS"
2725 >Code block redirection without forking</A
2726 ></DT
2727 ><DT
2728 >23-2. <A
2729 HREF="process-sub.html#PSUBP"
2730 >Redirecting the output of <I
2731 CLASS="FIRSTTERM"
2732 >process
2733 substitution</I
2734 > into a loop.</A
2735 ></DT
2736 ><DT
2737 >24-1. <A
2738 HREF="functions.html#EX59"
2739 >Simple functions</A
2740 ></DT
2741 ><DT
2742 >24-2. <A
2743 HREF="functions.html#EX60"
2744 >Function Taking Parameters</A
2745 ></DT
2746 ><DT
2747 >24-3. <A
2748 HREF="functions.html#FUNCCMDLINEARG"
2749 >Functions and command-line args passed to the script</A
2750 ></DT
2751 ><DT
2752 >24-4. <A
2753 HREF="functions.html#INDFUNC"
2754 >Passing an indirect reference to a function</A
2755 ></DT
2756 ><DT
2757 >24-5. <A
2758 HREF="functions.html#DEREFERENCECL"
2759 >Dereferencing a parameter passed to a function</A
2760 ></DT
2761 ><DT
2762 >24-6. <A
2763 HREF="functions.html#REFPARAMS"
2764 >Again, dereferencing a parameter passed to a function</A
2765 ></DT
2766 ><DT
2767 >24-7. <A
2768 HREF="functions.html#MAX"
2769 >Maximum of two numbers</A
2770 ></DT
2771 ><DT
2772 >24-8. <A
2773 HREF="functions.html#EX61"
2774 >Converting numbers to Roman numerals</A
2775 ></DT
2776 ><DT
2777 >24-9. <A
2778 HREF="functions.html#RETURNTEST"
2779 >Testing large return values in a function</A
2780 ></DT
2781 ><DT
2782 >24-10. <A
2783 HREF="functions.html#MAX2"
2784 >Comparing two large integers</A
2785 ></DT
2786 ><DT
2787 >24-11. <A
2788 HREF="functions.html#REALNAME"
2789 >Real name from username</A
2790 ></DT
2791 ><DT
2792 >24-12. <A
2793 HREF="localvar.html#EX62"
2794 >Local variable visibility</A
2795 ></DT
2796 ><DT
2797 >24-13. <A
2798 HREF="localvar.html#RECURSIONDEMO"
2799 >Demonstration of a simple recursive function</A
2800 ></DT
2801 ><DT
2802 >24-14. <A
2803 HREF="localvar.html#RECURSIONDEMO2"
2804 >Another simple demonstration</A
2805 ></DT
2806 ><DT
2807 >24-15. <A
2808 HREF="localvar.html#EX63"
2809 >Recursion, using a local variable</A
2810 ></DT
2811 ><DT
2812 >24-16. <A
2813 HREF="recurnolocvar.html#FIBO"
2814 ><I
2815 CLASS="FIRSTTERM"
2816 >The Fibonacci Sequence</I
2817 ></A
2818 ></DT
2819 ><DT
2820 >24-17. <A
2821 HREF="recurnolocvar.html#HANOI"
2822 ><I
2823 CLASS="FIRSTTERM"
2824 >The Towers of Hanoi</I
2825 ></A
2826 ></DT
2827 ><DT
2828 >25-1. <A
2829 HREF="aliases.html#AL"
2830 >Aliases within a script</A
2831 ></DT
2832 ><DT
2833 >25-2. <A
2834 HREF="aliases.html#UNAL"
2835 ><I
2836 CLASS="FIRSTTERM"
2837 >unalias</I
2838 >: Setting and unsetting
2839 an alias</A
2840 ></DT
2841 ><DT
2842 >26-1. <A
2843 HREF="list-cons.html#EX64"
2844 >Using an <I
2845 CLASS="FIRSTTERM"
2846 >and list</I
2847 > to test
2848 for command-line arguments</A
2849 ></DT
2850 ><DT
2851 >26-2. <A
2852 HREF="list-cons.html#ANDLIST2"
2853 >Another command-line arg test using an <I
2854 CLASS="FIRSTTERM"
2855 >and
2856 list</I
2857 ></A
2858 ></DT
2859 ><DT
2860 >26-3. <A
2861 HREF="list-cons.html#EX65"
2862 >Using <I
2863 CLASS="FIRSTTERM"
2864 >or lists</I
2865 > in combination
2866 with an <I
2867 CLASS="FIRSTTERM"
2868 >and list</I
2869 ></A
2870 ></DT
2871 ><DT
2872 >27-1. <A
2873 HREF="arrays.html#EX66"
2874 >Simple array usage</A
2875 ></DT
2876 ><DT
2877 >27-2. <A
2878 HREF="arrays.html#POEM"
2879 >Formatting a poem</A
2880 ></DT
2881 ><DT
2882 >27-3. <A
2883 HREF="arrays.html#ARRAYOPS"
2884 >Various array operations</A
2885 ></DT
2886 ><DT
2887 >27-4. <A
2888 HREF="arrays.html#ARRAYSTROPS"
2889 >String operations on arrays</A
2890 ></DT
2891 ><DT
2892 >27-5. <A
2893 HREF="arrays.html#SCRIPTARRAY"
2894 >Loading the contents of a script into an array</A
2895 ></DT
2896 ><DT
2897 >27-6. <A
2898 HREF="arrays.html#EX67"
2899 >Some special properties of arrays</A
2900 ></DT
2901 ><DT
2902 >27-7. <A
2903 HREF="arrays.html#EMPTYARRAY"
2904 >Of empty arrays and empty elements</A
2905 ></DT
2906 ><DT
2907 >27-8. <A
2908 HREF="arrays.html#ARRAYASSIGN"
2909 >Initializing arrays</A
2910 ></DT
2911 ><DT
2912 >27-9. <A
2913 HREF="arrays.html#COPYARRAY"
2914 >Copying and concatenating arrays</A
2915 ></DT
2916 ><DT
2917 >27-10. <A
2918 HREF="arrays.html#ARRAYAPPEND"
2919 >More on concatenating arrays</A
2920 ></DT
2921 ><DT
2922 >27-11. <A
2923 HREF="arrays.html#BUBBLE"
2924 >The Bubble Sort</A
2925 ></DT
2926 ><DT
2927 >27-12. <A
2928 HREF="arrays.html#EMBARR"
2929 >Embedded arrays and indirect references</A
2930 ></DT
2931 ><DT
2932 >27-13. <A
2933 HREF="arrays.html#EX68"
2934 >The Sieve of Eratosthenes</A
2935 ></DT
2936 ><DT
2937 >27-14. <A
2938 HREF="arrays.html#EX68A"
2939 >The Sieve of Eratosthenes, Optimized</A
2940 ></DT
2941 ><DT
2942 >27-15. <A
2943 HREF="arrays.html#STACKEX"
2944 >Emulating a push-down stack</A
2945 ></DT
2946 ><DT
2947 >27-16. <A
2948 HREF="arrays.html#QFUNCTION"
2949 >Complex array application:
2950 <SPAN
2951 CLASS="emphasis"
2952 ><I
2953 CLASS="EMPHASIS"
2954 >Exploring a weird mathematical series</I
2955 ></SPAN
2956 ></A
2957 ></DT
2958 ><DT
2959 >27-17. <A
2960 HREF="arrays.html#TWODIM"
2961 >Simulating a two-dimensional array, then tilting it</A
2962 ></DT
2963 ><DT
2964 >28-1. <A
2965 HREF="ivr.html#INDREF"
2966 >Indirect Variable References</A
2967 ></DT
2968 ><DT
2969 >28-2. <A
2970 HREF="ivr.html#COLTOTALER2"
2971 >Passing an indirect reference to <I
2972 CLASS="FIRSTTERM"
2973 >awk</I
2974 ></A
2975 ></DT
2976 ><DT
2977 >29-1. <A
2978 HREF="devproc.html#DEVTCP"
2979 >Using <TT
2980 CLASS="FILENAME"
2981 >/dev/tcp</TT
2982 > for
2983 troubleshooting</A
2984 ></DT
2985 ><DT
2986 >29-2. <A
2987 HREF="devproc.html#MUSICSCR"
2988 >Playing music</A
2989 ></DT
2990 ><DT
2991 >29-3. <A
2992 HREF="procref1.html#PIDID"
2993 >Finding the process associated with a PID</A
2994 ></DT
2995 ><DT
2996 >29-4. <A
2997 HREF="procref1.html#CONSTAT"
2998 >On-line connect status</A
2999 ></DT
3000 ><DT
3001 >30-1. <A
3002 HREF="networkprogramming.html#TESTCGI"
3003 >Print the server environment</A
3004 ></DT
3005 ><DT
3006 >30-2. <A
3007 HREF="networkprogramming.html#IPADDRESSES"
3008 >IP addresses</A
3009 ></DT
3010 ><DT
3011 >31-1. <A
3012 HREF="zeros.html#COOKIES"
3013 >Hiding the cookie jar</A
3014 ></DT
3015 ><DT
3016 >31-2. <A
3017 HREF="zeros.html#EX73"
3018 >Setting up a swapfile using <TT
3019 CLASS="FILENAME"
3020 >/dev/zero</TT
3021 ></A
3022 ></DT
3023 ><DT
3024 >31-3. <A
3025 HREF="zeros.html#RAMDISK"
3026 >Creating a ramdisk</A
3027 ></DT
3028 ><DT
3029 >32-1. <A
3030 HREF="debugging.html#EX74"
3031 >A buggy script</A
3032 ></DT
3033 ><DT
3034 >32-2. <A
3035 HREF="debugging.html#MISSINGKEYWORD"
3036 >Missing <A
3037 HREF="internal.html#KEYWORDREF"
3038 >keyword</A
3039 ></A
3040 ></DT
3041 ><DT
3042 >32-3. <A
3043 HREF="debugging.html#EX75"
3044 ><I
3045 CLASS="FIRSTTERM"
3046 >test24</I
3047 >: another buggy script</A
3048 ></DT
3049 ><DT
3050 >32-4. <A
3051 HREF="debugging.html#ASSERT"
3052 >Testing a condition with an
3053 <I
3054 CLASS="FIRSTTERM"
3055 >assert</I
3056 ></A
3057 ></DT
3058 ><DT
3059 >32-5. <A
3060 HREF="debugging.html#EX76"
3061 >Trapping at exit</A
3062 ></DT
3063 ><DT
3064 >32-6. <A
3065 HREF="debugging.html#ONLINE"
3066 >Cleaning up after <B
3067 CLASS="KEYCAP"
3068 >Control-C</B
3069 ></A
3070 ></DT
3071 ><DT
3072 >32-7. <A
3073 HREF="debugging.html#PROGRESSBAR2"
3074 >A Simple Implementation of a Progress Bar</A
3075 ></DT
3076 ><DT
3077 >32-8. <A
3078 HREF="debugging.html#VARTRACE"
3079 >Tracing a variable</A
3080 ></DT
3081 ><DT
3082 >32-9. <A
3083 HREF="debugging.html#MULTIPLEPROC"
3084 >Running multiple processes (on an SMP box)</A
3085 ></DT
3086 ><DT
3087 >34-1. <A
3088 HREF="gotchas.html#BADOP"
3089 >Numerical and string comparison are not equivalent</A
3090 ></DT
3091 ><DT
3092 >34-2. <A
3093 HREF="gotchas.html#SUBPIT"
3094 >Subshell Pitfalls</A
3095 ></DT
3096 ><DT
3097 >34-3. <A
3098 HREF="gotchas.html#BADREAD"
3099 >Piping the output of <I
3100 CLASS="FIRSTTERM"
3101 >echo</I
3102 > to a
3103 <I
3104 CLASS="FIRSTTERM"
3105 >read</I
3106 ></A
3107 ></DT
3108 ><DT
3109 >36-1. <A
3110 HREF="wrapper.html#EX3"
3111 ><I
3112 CLASS="FIRSTTERM"
3113 >shell wrapper</I
3114 ></A
3115 ></DT
3116 ><DT
3117 >36-2. <A
3118 HREF="wrapper.html#EX4"
3119 >A slightly more complex <I
3120 CLASS="FIRSTTERM"
3121 >shell
3122 wrapper</I
3123 ></A
3124 ></DT
3125 ><DT
3126 >36-3. <A
3127 HREF="wrapper.html#LOGGINGWRAPPER"
3128 >A generic <I
3129 CLASS="FIRSTTERM"
3130 >shell wrapper</I
3131 > that
3132 writes to a logfile</A
3133 ></DT
3134 ><DT
3135 >36-4. <A
3136 HREF="wrapper.html#PRASC"
3137 >A <I
3138 CLASS="FIRSTTERM"
3139 >shell wrapper</I
3140 > around an awk
3141 script</A
3142 ></DT
3143 ><DT
3144 >36-5. <A
3145 HREF="wrapper.html#COLTOTALER"
3146 >A <I
3147 CLASS="FIRSTTERM"
3148 >shell wrapper</I
3149 > around another
3150 awk script</A
3151 ></DT
3152 ><DT
3153 >36-6. <A
3154 HREF="wrapper.html#EX56"
3155 >Perl embedded in a <I
3156 CLASS="FIRSTTERM"
3157 >Bash</I
3158 > script</A
3159 ></DT
3160 ><DT
3161 >36-7. <A
3162 HREF="wrapper.html#BASHANDPERL"
3163 >Bash and Perl scripts combined</A
3164 ></DT
3165 ><DT
3166 >36-8. <A
3167 HREF="wrapper.html#EX56PY"
3168 >Python embedded in a <I
3169 CLASS="FIRSTTERM"
3170 >Bash</I
3171 > script</A
3172 ></DT
3173 ><DT
3174 >36-9. <A
3175 HREF="wrapper.html#SPEECH0"
3176 >A script that speaks</A
3177 ></DT
3178 ><DT
3179 >36-10. <A
3180 HREF="recursionsct.html#RECURSE"
3181 >A (useless) script that recursively calls itself</A
3182 ></DT
3183 ><DT
3184 >36-11. <A
3185 HREF="recursionsct.html#PBOOK"
3186 >A (useful) script that recursively calls itself</A
3187 ></DT
3188 ><DT
3189 >36-12. <A
3190 HREF="recursionsct.html#USRMNT"
3191 >Another (useful) script that recursively calls itself</A
3192 ></DT
3193 ><DT
3194 >36-13. <A
3195 HREF="colorizing.html#EX30A"
3196 >A <SPAN
3197 CLASS="QUOTE"
3198 >"colorized"</SPAN
3199 > address database</A
3200 ></DT
3201 ><DT
3202 >36-14. <A
3203 HREF="colorizing.html#DRAW-BOX"
3204 >Drawing a box</A
3205 ></DT
3206 ><DT
3207 >36-15. <A
3208 HREF="colorizing.html#COLORECHO"
3209 >Echoing colored text</A
3210 ></DT
3211 ><DT
3212 >36-16. <A
3213 HREF="colorizing.html#HORSERACE"
3214 >A <SPAN
3215 CLASS="QUOTE"
3216 >"horserace"</SPAN
3217 > game</A
3218 ></DT
3219 ><DT
3220 >36-17. <A
3221 HREF="assortedtips.html#PROGRESSBAR"
3222 >A Progress Bar</A
3223 ></DT
3224 ><DT
3225 >36-18. <A
3226 HREF="assortedtips.html#MULTIPLICATION"
3227 >Return value trickery</A
3228 ></DT
3229 ><DT
3230 >36-19. <A
3231 HREF="assortedtips.html#SUMPRODUCT"
3232 >Even more return value trickery</A
3233 ></DT
3234 ><DT
3235 >36-20. <A
3236 HREF="assortedtips.html#ARRFUNC"
3237 >Passing and returning arrays</A
3238 ></DT
3239 ><DT
3240 >36-21. <A
3241 HREF="assortedtips.html#AGRAM"
3242 >Fun with anagrams</A
3243 ></DT
3244 ><DT
3245 >36-22. <A
3246 HREF="assortedtips.html#DIALOG"
3247 >Widgets invoked from a shell script</A
3248 ></DT
3249 ><DT
3250 >36-23. <A
3251 HREF="portabilityissues.html#TESTSUITE"
3252 >Test Suite</A
3253 ></DT
3254 ><DT
3255 >37-1. <A
3256 HREF="bash2.html#EX77"
3257 >String expansion</A
3258 ></DT
3259 ><DT
3260 >37-2. <A
3261 HREF="bash2.html#EX78"
3262 >Indirect variable references - the new way</A
3263 ></DT
3264 ><DT
3265 >37-3. <A
3266 HREF="bash2.html#RESISTOR"
3267 >Simple database application, using indirect variable
3268 referencing</A
3269 ></DT
3270 ><DT
3271 >37-4. <A
3272 HREF="bash2.html#CARDS"
3273 >Using arrays and other miscellaneous trickery
3274 to deal four random hands from a deck of cards</A
3275 ></DT
3276 ><DT
3277 >37-5. <A
3278 HREF="bashver4.html#FETCHADDRESS"
3279 >A simple address database</A
3280 ></DT
3281 ><DT
3282 >37-6. <A
3283 HREF="bashver4.html#FETCHADDRESS2"
3284 >A somewhat more elaborate address database</A
3285 ></DT
3286 ><DT
3287 >37-7. <A
3288 HREF="bashver4.html#CASE4"
3289 >Testing characters</A
3290 ></DT
3291 ><DT
3292 >37-8. <A
3293 HREF="bashver4.html#READN"
3294 >Reading N characters</A
3295 ></DT
3296 ><DT
3297 >37-9. <A
3298 HREF="bashver4.html#HERECOMMSUB"
3299 >Using a <I
3300 CLASS="FIRSTTERM"
3301 >here document</I
3302 >
3303 to set a variable</A
3304 ></DT
3305 ><DT
3306 >37-10. <A
3307 HREF="bashver4.html#LASTPIPEOPT"
3308 >Piping input to a <A
3309 HREF="internal.html#READREF"
3310 >read</A
3311 ></A
3312 ></DT
3313 ><DT
3314 >37-11. <A
3315 HREF="bashver4.html#NEGARRAY"
3316 >Negative array indices</A
3317 ></DT
3318 ><DT
3319 >37-12. <A
3320 HREF="bashver4.html#NEGOFFSET"
3321 >Negative parameter in string-extraction
3322 construct</A
3323 ></DT
3324 ><DT
3325 >A-1. <A
3326 HREF="contributed-scripts.html#MAILFORMAT"
3327 ><I
3328 CLASS="FIRSTTERM"
3329 >mailformat</I
3330 >: Formatting an e-mail
3331 message</A
3332 ></DT
3333 ><DT
3334 >A-2. <A
3335 HREF="contributed-scripts.html#RN"
3336 ><I
3337 CLASS="FIRSTTERM"
3338 >rn</I
3339 >: A simple-minded file renaming
3340 utility</A
3341 ></DT
3342 ><DT
3343 >A-3. <A
3344 HREF="contributed-scripts.html#BLANKRENAME"
3345 ><I
3346 CLASS="FIRSTTERM"
3347 >blank-rename</I
3348 >: Renames filenames containing
3349 blanks</A
3350 ></DT
3351 ><DT
3352 >A-4. <A
3353 HREF="contributed-scripts.html#ENCRYPTEDPW"
3354 ><I
3355 CLASS="FIRSTTERM"
3356 >encryptedpw</I
3357 >: Uploading to an ftp site,
3358 using a locally encrypted password</A
3359 ></DT
3360 ><DT
3361 >A-5. <A
3362 HREF="contributed-scripts.html#COPYCD"
3363 ><I
3364 CLASS="FIRSTTERM"
3365 >copy-cd</I
3366 >: Copying a data CD</A
3367 ></DT
3368 ><DT
3369 >A-6. <A
3370 HREF="contributed-scripts.html#COLLATZ"
3371 >Collatz series</A
3372 ></DT
3373 ><DT
3374 >A-7. <A
3375 HREF="contributed-scripts.html#DAYSBETWEEN"
3376 ><I
3377 CLASS="FIRSTTERM"
3378 >days-between</I
3379 >: Days between two
3380 dates</A
3381 ></DT
3382 ><DT
3383 >A-8. <A
3384 HREF="contributed-scripts.html#MAKEDICT"
3385 >Making a <I
3386 CLASS="FIRSTTERM"
3387 >dictionary</I
3388 ></A
3389 ></DT
3390 ><DT
3391 >A-9. <A
3392 HREF="contributed-scripts.html#SOUNDEX"
3393 >Soundex conversion</A
3394 ></DT
3395 ><DT
3396 >A-10. <A
3397 HREF="contributed-scripts.html#LIFESLOW"
3398 ><I
3399 CLASS="FIRSTTERM"
3400 >Game of Life</I
3401 ></A
3402 ></DT
3403 ><DT
3404 >A-11. <A
3405 HREF="contributed-scripts.html#GEN0DATA"
3406 >Data file for <I
3407 CLASS="FIRSTTERM"
3408 >Game of Life</I
3409 ></A
3410 ></DT
3411 ><DT
3412 >A-12. <A
3413 HREF="contributed-scripts.html#BEHEAD"
3414 ><I
3415 CLASS="FIRSTTERM"
3416 >behead</I
3417 >: Removing mail and news
3418 message headers</A
3419 ></DT
3420 ><DT
3421 >A-13. <A
3422 HREF="contributed-scripts.html#PW"
3423 ><I
3424 CLASS="FIRSTTERM"
3425 >password</I
3426 >: Generating random
3427 8-character passwords</A
3428 ></DT
3429 ><DT
3430 >A-14. <A
3431 HREF="contributed-scripts.html#FIFO"
3432 ><I
3433 CLASS="FIRSTTERM"
3434 >fifo</I
3435 >: Making daily backups, using
3436 named pipes</A
3437 ></DT
3438 ><DT
3439 >A-15. <A
3440 HREF="contributed-scripts.html#PRIMES"
3441 >Generating prime numbers using the modulo operator</A
3442 ></DT
3443 ><DT
3444 >A-16. <A
3445 HREF="contributed-scripts.html#TREE"
3446 ><I
3447 CLASS="FIRSTTERM"
3448 >tree</I
3449 >: Displaying a directory tree</A
3450 ></DT
3451 ><DT
3452 >A-17. <A
3453 HREF="contributed-scripts.html#TREE2"
3454 ><I
3455 CLASS="FIRSTTERM"
3456 >tree2</I
3457 >: Alternate directory tree script</A
3458 ></DT
3459 ><DT
3460 >A-18. <A
3461 HREF="contributed-scripts.html#STRING"
3462 ><I
3463 CLASS="FIRSTTERM"
3464 >string functions</I
3465 >: C-style string
3466 functions</A
3467 ></DT
3468 ><DT
3469 >A-19. <A
3470 HREF="contributed-scripts.html#DIRECTORYINFO"
3471 >Directory information</A
3472 ></DT
3473 ><DT
3474 >A-20. <A
3475 HREF="contributed-scripts.html#HASHLIB"
3476 >Library of hash functions</A
3477 ></DT
3478 ><DT
3479 >A-21. <A
3480 HREF="contributed-scripts.html#HASHEXAMPLE"
3481 >Colorizing text using hash functions</A
3482 ></DT
3483 ><DT
3484 >A-22. <A
3485 HREF="contributed-scripts.html#HASHEX2"
3486 >More on hash functions</A
3487 ></DT
3488 ><DT
3489 >A-23. <A
3490 HREF="contributed-scripts.html#USBINST"
3491 >Mounting USB keychain storage devices</A
3492 ></DT
3493 ><DT
3494 >A-24. <A
3495 HREF="contributed-scripts.html#TOHTML"
3496 >Converting to HTML</A
3497 ></DT
3498 ><DT
3499 >A-25. <A
3500 HREF="contributed-scripts.html#ARCHIVWEBLOGS"
3501 >Preserving weblogs</A
3502 ></DT
3503 ><DT
3504 >A-26. <A
3505 HREF="contributed-scripts.html#PROTECTLITERAL"
3506 >Protecting literal strings</A
3507 ></DT
3508 ><DT
3509 >A-27. <A
3510 HREF="contributed-scripts.html#UNPROTECTLITERAL"
3511 >Unprotecting literal strings</A
3512 ></DT
3513 ><DT
3514 >A-28. <A
3515 HREF="contributed-scripts.html#ISSPAMMER2"
3516 >Spammer Identification</A
3517 ></DT
3518 ><DT
3519 >A-29. <A
3520 HREF="contributed-scripts.html#WHX"
3521 >Spammer Hunt</A
3522 ></DT
3523 ><DT
3524 >A-30. <A
3525 HREF="contributed-scripts.html#WGETTER2"
3526 >Making <I
3527 CLASS="FIRSTTERM"
3528 >wget</I
3529 > easier to use</A
3530 ></DT
3531 ><DT
3532 >A-31. <A
3533 HREF="contributed-scripts.html#BASHPODDER"
3534 >A <I
3535 CLASS="FIRSTTERM"
3536 >podcasting</I
3537 > script</A
3538 ></DT
3539 ><DT
3540 >A-32. <A
3541 HREF="contributed-scripts.html#NIGHTLYBACKUP"
3542 >Nightly backup to a firewire HD</A
3543 ></DT
3544 ><DT
3545 >A-33. <A
3546 HREF="contributed-scripts.html#CDLL"
3547 >An expanded <I
3548 CLASS="FIRSTTERM"
3549 >cd</I
3550 > command</A
3551 ></DT
3552 ><DT
3553 >A-34. <A
3554 HREF="contributed-scripts.html#SOUNDCARDON"
3555 >A soundcard setup script</A
3556 ></DT
3557 ><DT
3558 >A-35. <A
3559 HREF="contributed-scripts.html#FINDSPLIT"
3560 >Locating split paragraphs in a text file</A
3561 ></DT
3562 ><DT
3563 >A-36. <A
3564 HREF="contributed-scripts.html#INSERTIONSORT"
3565 >Insertion sort</A
3566 ></DT
3567 ><DT
3568 >A-37. <A
3569 HREF="contributed-scripts.html#STDDEV"
3570 >Standard Deviation</A
3571 ></DT
3572 ><DT
3573 >A-38. <A
3574 HREF="contributed-scripts.html#PADSW"
3575 >A <I
3576 CLASS="FIRSTTERM"
3577 >pad</I
3578 > file generator for shareware
3579 authors</A
3580 ></DT
3581 ><DT
3582 >A-39. <A
3583 HREF="contributed-scripts.html#MANED"
3584 >A <I
3585 CLASS="FIRSTTERM"
3586 >man page</I
3587 > editor</A
3588 ></DT
3589 ><DT
3590 >A-40. <A
3591 HREF="contributed-scripts.html#PETALS"
3592 >Petals Around the Rose</A
3593 ></DT
3594 ><DT
3595 >A-41. <A
3596 HREF="contributed-scripts.html#QKY"
3597 >Quacky: a Perquackey-type word game</A
3598 ></DT
3599 ><DT
3600 >A-42. <A
3601 HREF="contributed-scripts.html#NIM"
3602 >Nim</A
3603 ></DT
3604 ><DT
3605 >A-43. <A
3606 HREF="contributed-scripts.html#STOPWATCH"
3607 >A command-line stopwatch</A
3608 ></DT
3609 ><DT
3610 >A-44. <A
3611 HREF="contributed-scripts.html#HOMEWORK"
3612 >An all-purpose shell scripting homework assignment solution</A
3613 ></DT
3614 ><DT
3615 >A-45. <A
3616 HREF="contributed-scripts.html#KTOUR"
3617 >The Knight's Tour</A
3618 ></DT
3619 ><DT
3620 >A-46. <A
3621 HREF="contributed-scripts.html#MSQUARE"
3622 >Magic Squares</A
3623 ></DT
3624 ><DT
3625 >A-47. <A
3626 HREF="contributed-scripts.html#FIFTEEN"
3627 >Fifteen Puzzle</A
3628 ></DT
3629 ><DT
3630 >A-48. <A
3631 HREF="contributed-scripts.html#HANOI2"
3632 ><I
3633 CLASS="FIRSTTERM"
3634 >The Towers of Hanoi, graphic
3635 version</I
3636 ></A
3637 ></DT
3638 ><DT
3639 >A-49. <A
3640 HREF="contributed-scripts.html#HANOI2A"
3641 ><I
3642 CLASS="FIRSTTERM"
3643 >The Towers of Hanoi, alternate graphic
3644 version</I
3645 ></A
3646 ></DT
3647 ><DT
3648 >A-50. <A
3649 HREF="contributed-scripts.html#USEGETOPT"
3650 >An alternate version of the
3651 <A
3652 HREF="manipulatingvars.html#GETOPTSIMPLE"
3653 >getopt-simple.sh</A
3654 > script</A
3655 ></DT
3656 ><DT
3657 >A-51. <A
3658 HREF="contributed-scripts.html#USEGETOPT2"
3659 >The version of the
3660 <I
3661 CLASS="FIRSTTERM"
3662 >UseGetOpt.sh</I
3663 > example used in the <A
3664 HREF="tabexpansion.html"
3665 >Tab Expansion appendix</A
3666 ></A
3667 ></DT
3668 ><DT
3669 >A-52. <A
3670 HREF="contributed-scripts.html#SHOWALLC"
3671 >Cycling through all the possible color backgrounds</A
3672 ></DT
3673 ><DT
3674 >A-53. <A
3675 HREF="contributed-scripts.html#SAMORSE"
3676 >Morse Code Practice</A
3677 ></DT
3678 ><DT
3679 >A-54. <A
3680 HREF="contributed-scripts.html#BASE64"
3681 >Base64 encoding/decoding</A
3682 ></DT
3683 ><DT
3684 >A-55. <A
3685 HREF="contributed-scripts.html#SEDAPPEND"
3686 >Inserting text in a file using
3687 <I
3688 CLASS="FIRSTTERM"
3689 >sed</I
3690 ></A
3691 ></DT
3692 ><DT
3693 >A-56. <A
3694 HREF="contributed-scripts.html#GRONSFELD"
3695 >The Gronsfeld Cipher</A
3696 ></DT
3697 ><DT
3698 >A-57. <A
3699 HREF="contributed-scripts.html#BINGO"
3700 >Bingo Number Generator</A
3701 ></DT
3702 ><DT
3703 >A-58. <A
3704 HREF="contributed-scripts.html#BASICSREVIEWED"
3705 >Basics Reviewed</A
3706 ></DT
3707 ><DT
3708 >A-59. <A
3709 HREF="contributed-scripts.html#TESTEXECTIME"
3710 >Testing execution times of various commands</A
3711 ></DT
3712 ><DT
3713 >A-60. <A
3714 HREF="contributed-scripts.html#ASSOCARRTEST"
3715 >Associative arrays vs. conventional arrays (execution
3716 times)</A
3717 ></DT
3718 ><DT
3719 >C-1. <A
3720 HREF="awk.html#LETTERCOUNT2"
3721 >Counting Letter Occurrences</A
3722 ></DT
3723 ><DT
3724 >J-1. <A
3725 HREF="tabexpansion.html#USEGETOPTEX"
3726 >Completion script for
3727 <I
3728 CLASS="FIRSTTERM"
3729 >UseGetOpt.sh</I
3730 ></A
3731 ></DT
3732 ><DT
3733 >M-1. <A
3734 HREF="sample-bashrc.html#BASHRC"
3735 >Sample <TT
3736 CLASS="FILENAME"
3737 >.bashrc</TT
3738 > file</A
3739 ></DT
3740 ><DT
3741 >M-2. <A
3742 HREF="sample-bashrc.html#BASHPROF"
3743 ><TT
3744 CLASS="FILENAME"
3745 >.bash_profile</TT
3746 > file</A
3747 ></DT
3748 ><DT
3749 >N-1. <A
3750 HREF="dosbatch.html#VIEWDAT"
3751 >VIEWDATA.BAT: DOS Batch File</A
3752 ></DT
3753 ><DT
3754 >N-2. <A
3755 HREF="dosbatch.html#VIEWDATA"
3756 ><I
3757 CLASS="FIRSTTERM"
3758 >viewdata.sh</I
3759 >: Shell Script Conversion
3760 of VIEWDATA.BAT</A
3761 ></DT
3762 ><DT
3763 >T-1. <A
3764 HREF="asciitable.html#ASCIISH"
3765 >A script that generates an ASCII table</A
3766 ></DT
3767 ><DT
3768 >T-2. <A
3769 HREF="asciitable.html#ASCII2SH"
3770 >Another ASCII table script</A
3771 ></DT
3772 ><DT
3773 >T-3. <A
3774 HREF="asciitable.html#ASCII3SH"
3775 >A third ASCII table script, using
3776 <I
3777 CLASS="FIRSTTERM"
3778 >awk</I
3779 ></A
3780 ></DT
3781 ></DL
3782 ></DIV
3783 ></DIV
3784 ><DIV
3785 CLASS="NAVFOOTER"
3786 ><HR
3787 ALIGN="LEFT"
3788 WIDTH="100%"><TABLE
3789 SUMMARY="Footer navigation table"
3790 WIDTH="100%"
3791 BORDER="0"
3792 CELLPADDING="0"
3793 CELLSPACING="0"
3794 ><TR
3795 ><TD
3796 WIDTH="33%"
3797 ALIGN="left"
3798 VALIGN="top"
3799 >&nbsp;</TD
3800 ><TD
3801 WIDTH="34%"
3802 ALIGN="center"
3803 VALIGN="top"
3804 >&nbsp;</TD
3805 ><TD
3806 WIDTH="33%"
3807 ALIGN="right"
3808 VALIGN="top"
3809 ><A
3810 HREF="part1.html"
3811 ACCESSKEY="N"
3812 >Next</A
3813 ></TD
3814 ></TR
3815 ><TR
3816 ><TD
3817 WIDTH="33%"
3818 ALIGN="left"
3819 VALIGN="top"
3820 >&nbsp;</TD
3821 ><TD
3822 WIDTH="34%"
3823 ALIGN="center"
3824 VALIGN="top"
3825 >&nbsp;</TD
3826 ><TD
3827 WIDTH="33%"
3828 ALIGN="right"
3829 VALIGN="top"
3830 >Introduction</TD
3831 ></TR
3832 ></TABLE
3833 ></DIV
3834 ></BODY
3835 ></HTML
3836 >