Acknowledgments |
|
xi | |
|
Part I The Linux Command Line |
|
|
1 | (272) |
|
Chapter 1 Starting with Linux Shells |
|
|
3 | (18) |
|
|
3 | (14) |
|
Looking into the Linux kernel |
|
|
4 | (1) |
|
|
5 | (1) |
|
Software program management |
|
|
6 | (2) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
The Linux desktop environment |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (2) |
|
|
15 | (2) |
|
Examining Linux Distributions |
|
|
17 | (3) |
|
|
18 | (1) |
|
Specialized Linux distributions |
|
|
19 | (1) |
|
|
20 | (1) |
|
Chapter 2 Getting to the Shell |
|
|
21 | (26) |
|
Reaching the Command Line |
|
|
21 | (2) |
|
|
22 | (1) |
|
|
22 | (1) |
|
Accessing CLI via a Linux Console Terminal |
|
|
23 | (3) |
|
Accessing CLI via Graphical Terminal Emulation |
|
|
26 | (1) |
|
Using the GNOME Terminal Emulator |
|
|
27 | (9) |
|
|
27 | (5) |
|
|
32 | (4) |
|
Using the Konsole Terminal Emulator |
|
|
36 | (6) |
|
|
36 | (2) |
|
|
38 | (4) |
|
Using the xterm Terminal Emulator |
|
|
42 | (3) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
45 | (2) |
|
Chapter 3 Basic Bash Shell Commands |
|
|
47 | (38) |
|
|
47 | (1) |
|
|
48 | (1) |
|
Interacting with the Bash Manual |
|
|
49 | (4) |
|
Navigating the Filesystem |
|
|
53 | (7) |
|
Looking at the Linux filesystem |
|
|
53 | (4) |
|
|
57 | (1) |
|
Using absolute directory references |
|
|
57 | (2) |
|
Using relative directory references |
|
|
59 | (1) |
|
Listing Files and Directories |
|
|
60 | (6) |
|
Displaying a basic listing |
|
|
61 | (2) |
|
Displaying a long listing |
|
|
63 | (1) |
|
|
64 | (2) |
|
|
66 | (8) |
|
|
66 | (1) |
|
|
66 | (3) |
|
Using command-line completion |
|
|
69 | (1) |
|
|
69 | (2) |
|
|
71 | (2) |
|
|
73 | (1) |
|
|
74 | (3) |
|
|
74 | (1) |
|
|
75 | (2) |
|
|
77 | (3) |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
78 | (2) |
|
|
80 | (1) |
|
|
80 | (2) |
|
|
80 | (2) |
|
|
82 | (1) |
|
|
82 | (3) |
|
Chapter 4 More Bash Shell Commands |
|
|
85 | (28) |
|
|
85 | (11) |
|
|
85 | (1) |
|
|
86 | (3) |
|
|
89 | (2) |
|
|
91 | (2) |
|
Real-time process monitoring |
|
|
93 | (2) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
96 | (1) |
|
|
96 | (6) |
|
|
97 | (1) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
102 | (9) |
|
|
102 | (4) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
109 | (2) |
|
|
111 | (2) |
|
Chapter 5 Understanding the Shell |
|
|
113 | (24) |
|
Investigating Shell Types |
|
|
113 | (4) |
|
Exploring Parent and Child Shell Relationships |
|
|
117 | (10) |
|
|
121 | (2) |
|
Creatively using subshells |
|
|
123 | (1) |
|
Investigating background mode |
|
|
123 | (2) |
|
Putting process lists into the background |
|
|
125 | (1) |
|
|
126 | (1) |
|
Understanding External and Built-In Commands |
|
|
127 | (8) |
|
Looking at external commands |
|
|
128 | (1) |
|
Looking at built-in commands |
|
|
129 | (1) |
|
Using the history command |
|
|
130 | (4) |
|
|
134 | (1) |
|
|
135 | (2) |
|
Chapter 6 Using Linux Environment Variables |
|
|
137 | (26) |
|
Exploring Environment Variables |
|
|
137 | (4) |
|
Looking at global environment variables |
|
|
138 | (2) |
|
Looking at local environment variables |
|
|
140 | (1) |
|
Setting User-Defined Variables |
|
|
141 | (3) |
|
Setting local user-defined variables |
|
|
141 | (1) |
|
Setting global environment variables |
|
|
142 | (2) |
|
Removing Environment Variables |
|
|
144 | (1) |
|
Uncovering Default Shell Environment Variables |
|
|
145 | (5) |
|
Setting the PATH Environment Variable |
|
|
150 | (2) |
|
Locating System Environment Variables |
|
|
152 | (7) |
|
Understanding the login shell process |
|
|
152 | (1) |
|
Viewing the /etc/profile file |
|
|
152 | (4) |
|
Viewing the $HOME startup files |
|
|
156 | (1) |
|
Understanding the interactive shell process |
|
|
157 | (1) |
|
Understanding the noninteractive shell process |
|
|
158 | (1) |
|
Making environment variables persistent |
|
|
159 | (1) |
|
Learning about Variable Arrays |
|
|
159 | (2) |
|
|
161 | (2) |
|
Chapter 7 Understanding Linux File Permissions |
|
|
163 | (26) |
|
|
163 | (10) |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (3) |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
171 | (2) |
|
|
173 | (3) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
Decoding File Permissions |
|
|
176 | (3) |
|
Using file permission symbols |
|
|
176 | (2) |
|
|
178 | (1) |
|
Changing Security Settings |
|
|
179 | (3) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
182 | (2) |
|
|
184 | (2) |
|
|
186 | (3) |
|
Chapter 8 Managing Filesystems |
|
|
189 | (20) |
|
Exploring Linux Filesystems |
|
|
189 | (5) |
|
Exploring the Linux filesystem evolution |
|
|
190 | (1) |
|
Looking at the ext filesystem |
|
|
190 | (1) |
|
Looking at the ext2 filesystem |
|
|
190 | (1) |
|
Digging into journaling filesystems |
|
|
191 | (1) |
|
Looking at the ext3 filesystem |
|
|
191 | (1) |
|
Looking at the ext4 filesystem |
|
|
191 | (1) |
|
Looking at the JFS filesystem |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
Understanding the volume-managing filesystems |
|
|
192 | (1) |
|
Looking at the ZFS filesystem |
|
|
193 | (1) |
|
Looking at the Btrfs filesystem |
|
|
193 | (1) |
|
Looking at the Stratis filesystem |
|
|
193 | (1) |
|
|
194 | (8) |
|
|
194 | (1) |
|
Looking at the fdisk utility |
|
|
194 | (3) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (2) |
|
Checking and repairing a filesystem |
|
|
201 | (1) |
|
|
202 | (5) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
203 | (1) |
|
Understanding the LVM in Linux |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (1) |
|
Growing or shrinking your VGs and LVs |
|
|
206 | (1) |
|
|
207 | (2) |
|
Chapter 9 Installing Software |
|
|
209 | (26) |
|
Exploring Package Management |
|
|
209 | (1) |
|
Inspecting the Debian-Based Systems |
|
|
210 | (10) |
|
Managing packages with apt |
|
|
211 | (2) |
|
Installing software packages with apt |
|
|
213 | (2) |
|
Upgrading software with apt |
|
|
215 | (1) |
|
Uninstalling software with apt |
|
|
216 | (2) |
|
|
218 | (2) |
|
The Red Hat-Based Systems |
|
|
220 | (5) |
|
Listing installed packages |
|
|
220 | (1) |
|
Installing software with dnf |
|
|
221 | (2) |
|
Upgrading software with dnf |
|
|
223 | (1) |
|
Uninstalling software with dnf |
|
|
223 | (1) |
|
Dealing with broken dependencies |
|
|
223 | (1) |
|
|
224 | (1) |
|
Managing Software Using Containers |
|
|
225 | (4) |
|
|
225 | (2) |
|
|
227 | (2) |
|
Installing from Source Code |
|
|
229 | (3) |
|
|
232 | (3) |
|
Chapter 10 Working with Editors |
|
|
235 | (38) |
|
|
235 | (7) |
|
Checking your vim package |
|
|
236 | (1) |
|
|
237 | (3) |
|
|
240 | (1) |
|
|
240 | (1) |
|
Searching and substituting |
|
|
241 | (1) |
|
Navigating the nano Editor |
|
|
242 | (2) |
|
Exploring the Emacs Editor |
|
|
244 | (9) |
|
Checking your Emacs package |
|
|
245 | (1) |
|
Using Emacs on the console |
|
|
246 | (1) |
|
Exploring the basics of Emacs |
|
|
247 | (1) |
|
|
248 | (1) |
|
|
249 | (1) |
|
|
249 | (1) |
|
|
250 | (1) |
|
Using windows in console mode Emacs |
|
|
251 | (1) |
|
|
252 | (1) |
|
Exploring the KDE Family of Editors |
|
|
253 | (10) |
|
Looking at the KWrite editor |
|
|
253 | (6) |
|
Looking at the Kate editor |
|
|
259 | (4) |
|
Exploring the GNOME Editor |
|
|
263 | (8) |
|
|
264 | (1) |
|
Understanding basic gedit features |
|
|
265 | (3) |
|
|
268 | (3) |
|
|
271 | (2) |
|
Part II Shell Scripting Basics |
|
|
273 | (198) |
|
Chapter 11 Basic Script Building |
|
|
275 | (28) |
|
|
275 | (1) |
|
|
276 | (2) |
|
|
278 | (1) |
|
|
279 | (5) |
|
|
280 | (1) |
|
|
281 | (2) |
|
|
283 | (1) |
|
Redirecting Input and Output |
|
|
284 | (3) |
|
|
285 | (1) |
|
|
285 | (2) |
|
|
287 | (2) |
|
|
289 | (8) |
|
|
290 | (2) |
|
|
292 | (1) |
|
A floating-point solution |
|
|
293 | (1) |
|
|
293 | (2) |
|
|
295 | (2) |
|
|
297 | (3) |
|
|
297 | (1) |
|
|
298 | (2) |
|
Working through a Practical Example |
|
|
300 | (1) |
|
|
301 | (2) |
|
Chapter 12 Using Structured Commands |
|
|
303 | (42) |
|
Working with the if-then Statement |
|
|
303 | (3) |
|
Exploring the if-then-else Statement |
|
|
306 | (1) |
|
|
307 | (4) |
|
|
311 | (20) |
|
Using numeric comparisons |
|
|
313 | (1) |
|
|
314 | (1) |
|
Looking at string equality |
|
|
315 | (1) |
|
|
316 | (2) |
|
|
318 | (2) |
|
|
320 | (1) |
|
|
320 | (1) |
|
Checking whether an object exists |
|
|
321 | (1) |
|
|
322 | (2) |
|
|
324 | (1) |
|
|
325 | (1) |
|
Checking whether you can write to a file |
|
|
326 | (1) |
|
Checking whether you can run a file |
|
|
327 | (1) |
|
|
328 | (1) |
|
Checking default group membership |
|
|
329 | (1) |
|
|
330 | (1) |
|
Considering Compound Testing |
|
|
331 | (1) |
|
Working with Advanced if-then Features |
|
|
332 | (3) |
|
|
332 | (1) |
|
|
333 | (2) |
|
|
335 | (1) |
|
Considering the case Command |
|
|
335 | (2) |
|
Working through a Practical Example |
|
|
337 | (6) |
|
|
343 | (2) |
|
Chapter 13 More Structured Commands |
|
|
345 | (32) |
|
Looking at the for Command |
|
|
345 | (9) |
|
|
346 | (1) |
|
Reading complex values in a list |
|
|
347 | (2) |
|
Reading a list from a variable |
|
|
349 | (1) |
|
Reading values from a command |
|
|
350 | (1) |
|
Changing the field separator |
|
|
351 | (1) |
|
Reading a directory using wildcards |
|
|
352 | (2) |
|
Trying the C-Style for Command |
|
|
354 | (3) |
|
The C language for command |
|
|
355 | (1) |
|
|
356 | (1) |
|
Exploring the while Command |
|
|
357 | (2) |
|
|
357 | (1) |
|
Using multiple test commands |
|
|
358 | (1) |
|
|
359 | (2) |
|
|
361 | (3) |
|
|
364 | (1) |
|
|
365 | (6) |
|
|
365 | (1) |
|
Breaking out of a single loop |
|
|
365 | (1) |
|
Breaking out of an inner loop |
|
|
366 | (1) |
|
Breaking out of an outer loop |
|
|
367 | (1) |
|
|
368 | (3) |
|
Processing the Output of a Loop |
|
|
371 | (1) |
|
Working through a Few Practical Examples |
|
|
372 | (3) |
|
|
373 | (1) |
|
Creating multiple user accounts |
|
|
374 | (1) |
|
|
375 | (2) |
|
Chapter 14 Handling User Input |
|
|
377 | (34) |
|
|
377 | (5) |
|
|
377 | (3) |
|
|
380 | (1) |
|
|
381 | (1) |
|
Using Special Parameter Variables |
|
|
382 | (4) |
|
|
382 | (2) |
|
|
384 | (2) |
|
|
386 | (2) |
|
|
388 | (10) |
|
|
388 | (1) |
|
Processing simple options |
|
|
388 | (1) |
|
Separating options from parameters |
|
|
389 | (2) |
|
Processing options with values |
|
|
391 | (1) |
|
|
392 | (1) |
|
Looking at the command format |
|
|
392 | (1) |
|
Using getopt in your scripts |
|
|
393 | (2) |
|
|
395 | (3) |
|
|
398 | (1) |
|
|
399 | (5) |
|
|
399 | (2) |
|
|
401 | (1) |
|
|
402 | (1) |
|
|
403 | (1) |
|
Working through a Practical Example |
|
|
404 | (4) |
|
|
408 | (3) |
|
Chapter 15 Presenting Data |
|
|
411 | (24) |
|
Understanding Input and Output |
|
|
411 | (5) |
|
Standard file descriptors |
|
|
412 | (1) |
|
|
412 | (1) |
|
|
413 | (1) |
|
|
414 | (1) |
|
|
414 | (1) |
|
|
414 | (1) |
|
Redirecting errors and data |
|
|
415 | (1) |
|
Redirecting Output in Scripts |
|
|
416 | (2) |
|
|
416 | (1) |
|
|
417 | (1) |
|
Redirecting Input in Scripts |
|
|
418 | (1) |
|
Creating Your Own Redirection |
|
|
419 | (5) |
|
Creating output file descriptors |
|
|
419 | (1) |
|
Redirecting file descriptors |
|
|
420 | (1) |
|
Creating input file descriptors |
|
|
421 | (1) |
|
Creating a read/write file descriptor |
|
|
422 | (1) |
|
|
423 | (1) |
|
Listing Open File Descriptors |
|
|
424 | (2) |
|
Suppressing Command Output |
|
|
426 | (1) |
|
|
427 | (3) |
|
Creating a local temporary file |
|
|
427 | (1) |
|
Creating a temporary file in /tmp |
|
|
428 | (1) |
|
Creating a temporary directory |
|
|
429 | (1) |
|
|
430 | (1) |
|
Working through a Practical Example |
|
|
431 | (2) |
|
|
433 | (2) |
|
Chapter 16 Script Control |
|
|
435 | (36) |
|
|
435 | (8) |
|
|
435 | (1) |
|
|
436 | (1) |
|
|
436 | (1) |
|
|
437 | (1) |
|
|
438 | (2) |
|
|
440 | (1) |
|
Modifying or removing a trap |
|
|
441 | (2) |
|
Running Scripts in Background Mode |
|
|
443 | (4) |
|
Running in the background |
|
|
443 | (2) |
|
Running multiple background jobs |
|
|
445 | (2) |
|
Running Scripts without a Hang-up |
|
|
447 | (1) |
|
|
448 | (3) |
|
|
448 | (2) |
|
|
450 | (1) |
|
|
451 | (3) |
|
|
452 | (1) |
|
|
453 | (1) |
|
|
454 | (9) |
|
Scheduling a job using the at command |
|
|
454 | (1) |
|
Understanding the at command format |
|
|
454 | (1) |
|
|
455 | (2) |
|
|
457 | (1) |
|
|
457 | (1) |
|
Scheduling regular scripts |
|
|
458 | (1) |
|
Looking at the cron table |
|
|
458 | (1) |
|
|
459 | (1) |
|
|
460 | (1) |
|
Looking at the anacron program |
|
|
460 | (2) |
|
Starting scripts with a new shell |
|
|
462 | (1) |
|
Working through a Practical Example |
|
|
463 | (6) |
|
|
469 | (2) |
|
Part III Advanced Shell Scripting |
|
|
471 | (208) |
|
Chapter 17 Creating Functions |
|
|
473 | (26) |
|
Exploring Basic Script Functions |
|
|
473 | (4) |
|
|
474 | (1) |
|
|
474 | (3) |
|
Returning a Value from a Function |
|
|
477 | (3) |
|
|
477 | (1) |
|
|
478 | (1) |
|
|
479 | (1) |
|
Using Variables in Functions |
|
|
480 | (5) |
|
Passing parameters to a function |
|
|
480 | (2) |
|
Handling variables in a function |
|
|
482 | (1) |
|
|
483 | (1) |
|
|
484 | (1) |
|
Investigating Array Variables and Functions |
|
|
485 | (3) |
|
Passing arrays to functions |
|
|
485 | (2) |
|
Returning arrays from functions |
|
|
487 | (1) |
|
Considering Function Recursion |
|
|
488 | (1) |
|
|
489 | (2) |
|
Using Functions on the Command Line |
|
|
491 | (3) |
|
Creating functions on the command line |
|
|
491 | (1) |
|
Defining functions in the bashrc file |
|
|
492 | (1) |
|
Directly defining functions |
|
|
492 | (1) |
|
|
493 | (1) |
|
Working Through a Practical Example |
|
|
494 | (3) |
|
Downloading and installing |
|
|
494 | (1) |
|
|
495 | (1) |
|
The shtool library functions |
|
|
496 | (1) |
|
|
497 | (1) |
|
|
497 | (2) |
|
Chapter 18 Writing Scripts for Graphical Desktops |
|
|
499 | (32) |
|
|
499 | (6) |
|
|
499 | (2) |
|
Create the menu functions |
|
|
501 | (1) |
|
|
502 | (1) |
|
|
502 | (2) |
|
|
504 | (1) |
|
|
505 | (11) |
|
|
506 | (1) |
|
|
507 | (1) |
|
|
508 | (1) |
|
|
508 | (2) |
|
|
510 | (1) |
|
|
511 | (1) |
|
|
512 | (1) |
|
|
513 | (2) |
|
Using the dialog command in a script |
|
|
515 | (1) |
|
|
516 | (9) |
|
|
517 | (1) |
|
|
517 | (2) |
|
|
519 | (2) |
|
|
521 | (1) |
|
|
521 | (2) |
|
|
523 | (2) |
|
Working Through a Practical Example |
|
|
525 | (4) |
|
|
529 | (2) |
|
Chapter 19 Introducing sed and gawk |
|
|
531 | (34) |
|
|
531 | (11) |
|
Getting to know the sed editor |
|
|
532 | (1) |
|
Defining an editor command in the command line |
|
|
533 | (1) |
|
Using multiple editor commands in the command line |
|
|
534 | (1) |
|
Reading editor commands from a file |
|
|
534 | (1) |
|
Getting to know the gawk program |
|
|
535 | (1) |
|
Visiting the gawk command format |
|
|
536 | (1) |
|
Reading the program script from the command line |
|
|
536 | (1) |
|
Using data field variables |
|
|
537 | (1) |
|
Using multiple commands in the program script |
|
|
538 | (1) |
|
Reading the program from a file |
|
|
539 | (1) |
|
Running scripts before processing data |
|
|
539 | (1) |
|
Running scripts after processing data |
|
|
540 | (2) |
|
Looking at the sed Editor Basic Commands |
|
|
542 | (17) |
|
Introducing more substitution options |
|
|
542 | (1) |
|
|
542 | (1) |
|
|
543 | (1) |
|
|
544 | (1) |
|
Addressing the numeric line |
|
|
544 | (1) |
|
Using text pattern filters |
|
|
545 | (1) |
|
|
546 | (1) |
|
|
547 | (2) |
|
Inserting and appending text |
|
|
549 | (2) |
|
|
551 | (1) |
|
|
552 | (1) |
|
|
553 | (1) |
|
|
554 | (1) |
|
|
555 | (1) |
|
|
555 | (1) |
|
|
556 | (1) |
|
|
556 | (1) |
|
|
557 | (2) |
|
Working Through a Practical Example |
|
|
559 | (5) |
|
|
564 | (1) |
|
Chapter 20 Regular Expressions |
|
|
565 | (26) |
|
Exploring Regular Expressions |
|
|
565 | (2) |
|
|
565 | (2) |
|
Types of regular expressions |
|
|
567 | (1) |
|
|
567 | (12) |
|
|
567 | (2) |
|
|
569 | (1) |
|
|
570 | (1) |
|
Starting at the beginning |
|
|
570 | (1) |
|
|
571 | (1) |
|
|
572 | (1) |
|
|
572 | (1) |
|
|
573 | (2) |
|
Negating character classes |
|
|
575 | (1) |
|
|
576 | (1) |
|
Special character classes |
|
|
577 | (1) |
|
|
578 | (1) |
|
Trying Out Extended Regular Expressions |
|
|
579 | (5) |
|
|
579 | (1) |
|
|
580 | (1) |
|
|
581 | (1) |
|
|
582 | (1) |
|
|
583 | (1) |
|
Working Through Some Practical Examples |
|
|
584 | (5) |
|
|
584 | (1) |
|
Validating a phone number |
|
|
585 | (2) |
|
|
587 | (2) |
|
|
589 | (2) |
|
|
591 | (36) |
|
Looking at Multiline Commands |
|
|
591 | (7) |
|
Navigating the next command |
|
|
592 | (1) |
|
Using the single-line next command |
|
|
592 | (1) |
|
|
593 | (2) |
|
Navigating the multiline delete command |
|
|
595 | (1) |
|
Navigating the multiline print command |
|
|
596 | (2) |
|
|
598 | (1) |
|
|
599 | (3) |
|
|
602 | (4) |
|
|
603 | (2) |
|
|
605 | (1) |
|
|
606 | (2) |
|
|
606 | (1) |
|
Replacing individual words |
|
|
607 | (1) |
|
Placing sed Commands in Scripts |
|
|
608 | (2) |
|
|
608 | (1) |
|
|
609 | (1) |
|
|
610 | (9) |
|
Spacing with double lines |
|
|
610 | (1) |
|
Spacing files that may have blanks |
|
|
611 | (1) |
|
Numbering lines in a file |
|
|
612 | (1) |
|
|
613 | (1) |
|
|
614 | (1) |
|
Deleting consecutive blank lines |
|
|
615 | (1) |
|
Deleting leading blank lines |
|
|
616 | (1) |
|
Deleting trailing blank lines |
|
|
616 | (1) |
|
|
617 | (2) |
|
Working Through a Practical Example |
|
|
619 | (5) |
|
|
624 | (3) |
|
|
627 | (32) |
|
|
627 | (9) |
|
|
628 | (1) |
|
The field and record separator variables |
|
|
628 | (3) |
|
|
631 | (3) |
|
|
634 | (1) |
|
Assigning variables in scripts |
|
|
634 | (1) |
|
Assigning variables on the command line |
|
|
635 | (1) |
|
|
636 | (2) |
|
|
636 | (1) |
|
Iterating through array variables |
|
|
637 | (1) |
|
|
638 | (1) |
|
|
638 | (3) |
|
|
639 | (1) |
|
|
639 | (1) |
|
|
640 | (1) |
|
|
641 | (4) |
|
|
641 | (2) |
|
|
643 | (1) |
|
|
644 | (1) |
|
|
645 | (1) |
|
|
645 | (3) |
|
|
648 | (5) |
|
|
649 | (1) |
|
|
650 | (2) |
|
|
652 | (1) |
|
Trying Out User-Defined Functions |
|
|
653 | (2) |
|
|
653 | (1) |
|
|
654 | (1) |
|
Creating a function library |
|
|
654 | (1) |
|
Working Through a Practical Example |
|
|
655 | (2) |
|
|
657 | (2) |
|
Chapter 23 Working with Alternative Shells |
|
|
659 | (20) |
|
Considering the Dash Shell |
|
|
659 | (2) |
|
Looking at the Dash Shell Features |
|
|
661 | (4) |
|
The Dash command-line parameters |
|
|
661 | (1) |
|
The Dash environment variables |
|
|
662 | (1) |
|
Default environment variables |
|
|
662 | (1) |
|
|
663 | (1) |
|
User-defined environment variables |
|
|
663 | (1) |
|
The Dash built-in commands |
|
|
664 | (1) |
|
|
665 | (3) |
|
|
665 | (1) |
|
|
665 | (1) |
|
|
666 | (1) |
|
|
666 | (1) |
|
|
667 | (1) |
|
|
668 | (1) |
|
Viewing Parts of the zsh shell |
|
|
668 | (6) |
|
|
669 | (1) |
|
|
670 | (1) |
|
|
670 | (3) |
|
|
673 | (1) |
|
Viewing, adding, and removing modules |
|
|
673 | (1) |
|
|
674 | (3) |
|
|
674 | (1) |
|
|
674 | (1) |
|
|
675 | (1) |
|
|
676 | (1) |
|
|
677 | (1) |
|
Working Through a Practical Example |
|
|
677 | (1) |
|
|
678 | (1) |
|
Part IV Creating and Managing Practical Scripts |
|
|
679 | (62) |
|
Chapter 24 Writing Simple Script Utilities |
|
|
681 | (42) |
|
|
681 | (12) |
|
|
682 | (1) |
|
Obtaining the required functions |
|
|
682 | (3) |
|
Creating a daily archive location |
|
|
685 | (1) |
|
Creating a daily backup script |
|
|
686 | (2) |
|
Running the daily archive script |
|
|
688 | (1) |
|
Creating an hourly archive script |
|
|
689 | (3) |
|
Running the hourly archive script |
|
|
692 | (1) |
|
Managing Account Deletion |
|
|
693 | (10) |
|
Obtaining the required functions |
|
|
693 | (1) |
|
Getting the correct account name |
|
|
693 | (2) |
|
Creating a function to get the correct account name |
|
|
695 | (1) |
|
Verifying the entered account name |
|
|
696 | (2) |
|
Determining whether the account exists |
|
|
698 | (1) |
|
Removing any account processes |
|
|
699 | (3) |
|
|
702 | (1) |
|
|
702 | (1) |
|
|
703 | (5) |
|
|
708 | (2) |
|
|
710 | (11) |
|
Obtaining the default shell audit functions |
|
|
710 | (4) |
|
Obtaining the permission audit functions |
|
|
714 | (2) |
|
|
716 | (3) |
|
|
719 | (2) |
|
|
721 | (2) |
|
Chapter 25 Getting Organized |
|
|
723 | (18) |
|
Understanding Version Control |
|
|
723 | (4) |
|
|
724 | (1) |
|
|
725 | (1) |
|
Looking at the local repository |
|
|
725 | (1) |
|
Exploring a remote repository |
|
|
726 | (1) |
|
|
726 | (1) |
|
|
726 | (1) |
|
|
727 | (1) |
|
Setting Up Your Git Environment |
|
|
727 | (5) |
|
|
732 | (7) |
|
|
739 | (2) |
Appendix A Quick Guide to Bash Commands |
|
741 | (14) |
Appendix B Quick Guide to sed and gawk |
|
755 | (12) |
Index |
|
767 | |