{"product_id":"linux-command-line-and-shell-scripting-bible-isbn-9781119700913","title":"Linux Command Line and Shell Scripting Bible","description":"\u003cp\u003e\u003cb\u003eAdvance your understanding of the Linux command line with this invaluable resource \u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003ci\u003eLinux Command Line and Shell Scripting Bible, 4th Edition\u003c\/i\u003e is the newest installment in the indispensable series known to Linux developers all over the world. Packed with concrete strategies and practical tips, the latest edition includes brand-new content covering:\u003c\/p\u003e \u003cul\u003e \u003cli\u003eUnderstanding the Shell  \u003c\/li\u003e \u003cli\u003eWriting Simple Script Utilities  \u003c\/li\u003e \u003cli\u003eProducing Database, Web \u0026amp; Email Scripts  \u003c\/li\u003e \u003cli\u003eCreating Fun Little Shell Scripts \u003c\/li\u003e \u003c\/ul\u003e \u003cp\u003eWritten by accomplished Linux professionals Christine Bresnahan and Richard Blum, Linux Command Line and Shell Scripting Bible, 4th Edition teaches readers the fundamentals and advanced topics necessary for a comprehensive understanding of shell scripting in Linux. The book is filled with real-world examples and usable scripts, helping readers navigate the challenging Linux environment with ease and convenience. \u003c\/p\u003e \u003cp\u003eThe book is perfect for anyone who uses Linux at home or in the office and will quickly find a place on every Linux enthusiast’s bookshelf.\u003c\/p\u003e \u003cp\u003eAcknowledgments xi\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart I: The Linux Command Line 1\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 1: Starting with Linux Shells 3\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eInvestigating Linux 3\u003c\/p\u003e \u003cp\u003eLooking into the Linux kernel 4\u003c\/p\u003e \u003cp\u003eSystem memory management 5\u003c\/p\u003e \u003cp\u003eSoftware program management 6\u003c\/p\u003e \u003cp\u003eHardware management 8\u003c\/p\u003e \u003cp\u003eFilesystem management 8\u003c\/p\u003e \u003cp\u003eThe GNU utilities 9\u003c\/p\u003e \u003cp\u003eThe core GNU utilities 10\u003c\/p\u003e \u003cp\u003eThe shell 10\u003c\/p\u003e \u003cp\u003eThe Linux desktop environment 11\u003c\/p\u003e \u003cp\u003eThe X Window software 12\u003c\/p\u003e \u003cp\u003eThe KDE Plasma desktop 12\u003c\/p\u003e \u003cp\u003eThe GNOME desktop 13\u003c\/p\u003e \u003cp\u003eOther desktops 15\u003c\/p\u003e \u003cp\u003eExamining Linux Distributions 17\u003c\/p\u003e \u003cp\u003eCore Linux distributions 18\u003c\/p\u003e \u003cp\u003eSpecialized Linux distributions 19\u003c\/p\u003e \u003cp\u003eSummary 20\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 2: Getting to the Shell 21\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eReaching the Command Line 21\u003c\/p\u003e \u003cp\u003eConsole terminals 22\u003c\/p\u003e \u003cp\u003eGraphical terminals 22\u003c\/p\u003e \u003cp\u003eAccessing CLI via a Linux Console Terminal 23\u003c\/p\u003e \u003cp\u003eAccessing CLI via Graphical Terminal Emulation 26\u003c\/p\u003e \u003cp\u003eUsing the GNOME Terminal Emulator 27\u003c\/p\u003e \u003cp\u003eAccessing GNOME Terminal 27\u003c\/p\u003e \u003cp\u003eThe menu bar 32\u003c\/p\u003e \u003cp\u003eUsing the Konsole Terminal Emulator 36\u003c\/p\u003e \u003cp\u003eAccessing Konsole 36\u003c\/p\u003e \u003cp\u003eThe menu bar 38\u003c\/p\u003e \u003cp\u003eUsing the xterm Terminal Emulator 42\u003c\/p\u003e \u003cp\u003eAccessing xterm 43\u003c\/p\u003e \u003cp\u003eCommand-line parameters 44\u003c\/p\u003e \u003cp\u003eSummary 45\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 3: Basic Bash Shell Commands 47\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eStarting the Shell 47\u003c\/p\u003e \u003cp\u003eUsing the Shell Prompt 48\u003c\/p\u003e \u003cp\u003eInteracting with the Bash Manual 49\u003c\/p\u003e \u003cp\u003eNavigating the Filesystem 53\u003c\/p\u003e \u003cp\u003eLooking at the Linux filesystem 53\u003c\/p\u003e \u003cp\u003eTraversing directories 57\u003c\/p\u003e \u003cp\u003eUsing absolute directory references 57\u003c\/p\u003e \u003cp\u003eUsing relative directory references 59\u003c\/p\u003e \u003cp\u003eListing Files and Directories 60\u003c\/p\u003e \u003cp\u003eDisplaying a basic listing 61\u003c\/p\u003e \u003cp\u003eDisplaying a long listing 63\u003c\/p\u003e \u003cp\u003eFiltering listing output 64\u003c\/p\u003e \u003cp\u003eHandling Files 66\u003c\/p\u003e \u003cp\u003eCreating files 66\u003c\/p\u003e \u003cp\u003eCopying files 66\u003c\/p\u003e \u003cp\u003eUsing command-line completion 69\u003c\/p\u003e \u003cp\u003eLinking files 69\u003c\/p\u003e \u003cp\u003eRenaming files 71\u003c\/p\u003e \u003cp\u003eDeleting files 73\u003c\/p\u003e \u003cp\u003eManaging Directories 74\u003c\/p\u003e \u003cp\u003eCreating directories 74\u003c\/p\u003e \u003cp\u003eDeleting directories 75\u003c\/p\u003e \u003cp\u003eViewing File Contents 77\u003c\/p\u003e \u003cp\u003eViewing the file type 77\u003c\/p\u003e \u003cp\u003eViewing the whole file 78\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003ecat \u003c\/i\u003ecommand 78\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003emore \u003c\/i\u003ecommand 78\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003eless \u003c\/i\u003ecommand 80\u003c\/p\u003e \u003cp\u003eViewing parts of a file 80\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003etail \u003c\/i\u003ecommand 80\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003ehead \u003c\/i\u003ecommand 82\u003c\/p\u003e \u003cp\u003eSummary 82\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 4: More Bash Shell Commands 85\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eMonitoring Programs 85\u003c\/p\u003e \u003cp\u003ePeeking at the processes 85\u003c\/p\u003e \u003cp\u003eUnix-style parameters 86\u003c\/p\u003e \u003cp\u003eBSD-style parameters 89\u003c\/p\u003e \u003cp\u003eThe GNU long parameters 91\u003c\/p\u003e \u003cp\u003eReal-time process monitoring 93\u003c\/p\u003e \u003cp\u003eStopping processes 95\u003c\/p\u003e \u003cp\u003eThe kill command 95\u003c\/p\u003e \u003cp\u003eThe pkill command 96\u003c\/p\u003e \u003cp\u003eMonitoring Disk Space 96\u003c\/p\u003e \u003cp\u003eMounting media 97\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003emount \u003c\/i\u003ecommand 97\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eumount \u003c\/i\u003ecommand 99\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003edf \u003c\/i\u003ecommand 100\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003edu \u003c\/i\u003ecommand 101\u003c\/p\u003e \u003cp\u003eWorking with Data Files 102\u003c\/p\u003e \u003cp\u003eSorting data 102\u003c\/p\u003e \u003cp\u003eSearching for data 106\u003c\/p\u003e \u003cp\u003eCompressing data 108\u003c\/p\u003e \u003cp\u003eArchiving data 109\u003c\/p\u003e \u003cp\u003eSummary 111\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 5: Understanding the Shell 113\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eInvestigating Shell Types 113\u003c\/p\u003e \u003cp\u003eExploring Parent and Child Shell Relationships 117\u003c\/p\u003e \u003cp\u003eLooking at process lists 121\u003c\/p\u003e \u003cp\u003eCreatively using subshells 123\u003c\/p\u003e \u003cp\u003eInvestigating background mode 123\u003c\/p\u003e \u003cp\u003ePutting process lists into the background 125\u003c\/p\u003e \u003cp\u003eLooking at co-processing 126\u003c\/p\u003e \u003cp\u003eUnderstanding External and Built-In Commands 127\u003c\/p\u003e \u003cp\u003eLooking at external commands 128\u003c\/p\u003e \u003cp\u003eLooking at built-in commands 129\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003ehistory \u003c\/i\u003ecommand 130\u003c\/p\u003e \u003cp\u003eUsing command aliases 134\u003c\/p\u003e \u003cp\u003eSummary 135\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 6: Using Linux Environment Variables 137\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Environment Variables 137\u003c\/p\u003e \u003cp\u003eLooking at global environment variables 138\u003c\/p\u003e \u003cp\u003eLooking at local environment variables 140\u003c\/p\u003e \u003cp\u003eSetting User-Defined Variables 141\u003c\/p\u003e \u003cp\u003eSetting local user-defined variables 141\u003c\/p\u003e \u003cp\u003eSetting global environment variables 142\u003c\/p\u003e \u003cp\u003eRemoving Environment Variables 144\u003c\/p\u003e \u003cp\u003eUncovering Default Shell Environment Variables 145\u003c\/p\u003e \u003cp\u003eSetting the \u003ci\u003ePATH \u003c\/i\u003eEnvironment Variable 150\u003c\/p\u003e \u003cp\u003eLocating System Environment Variables 152\u003c\/p\u003e \u003cp\u003eUnderstanding the login shell process 152\u003c\/p\u003e \u003cp\u003eViewing the \u003ci\u003e\/etc\/profi le file \u003c\/i\u003e152\u003c\/p\u003e \u003cp\u003eViewing the \u003ci\u003e$HOME \u003c\/i\u003estartup files 156\u003c\/p\u003e \u003cp\u003eUnderstanding the interactive shell process 157\u003c\/p\u003e \u003cp\u003eUnderstanding the noninteractive shell process 158\u003c\/p\u003e \u003cp\u003eMaking environment variables persistent 159\u003c\/p\u003e \u003cp\u003eLearning about Variable Arrays 159\u003c\/p\u003e \u003cp\u003eSummary 161\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 7: Understanding Linux File Permissions 163\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Linux Security 163\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003e\/etc\/passwd file \u003c\/i\u003e164\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003e\/etc\/shadow file \u003c\/i\u003e165\u003c\/p\u003e \u003cp\u003eAdding a new user 166\u003c\/p\u003e \u003cp\u003eRemoving a user 169\u003c\/p\u003e \u003cp\u003eModifying a user 169\u003c\/p\u003e \u003cp\u003e\u003ci\u003eusermod \u003c\/i\u003e170\u003c\/p\u003e \u003cp\u003e\u003ci\u003epasswd \u003c\/i\u003eand \u003ci\u003echpasswd \u003c\/i\u003e170\u003c\/p\u003e \u003cp\u003e\u003ci\u003echsh\u003c\/i\u003e, \u003ci\u003echfn\u003c\/i\u003e, and \u003ci\u003echage \u003c\/i\u003e171\u003c\/p\u003e \u003cp\u003eUsing Linux Groups 173\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003e\/etc\/group file \u003c\/i\u003e173\u003c\/p\u003e \u003cp\u003eCreating new groups 174\u003c\/p\u003e \u003cp\u003eModifying groups 175\u003c\/p\u003e \u003cp\u003eDecoding File Permissions 176\u003c\/p\u003e \u003cp\u003eUsing file permission symbols 176\u003c\/p\u003e \u003cp\u003eDefault file permissions 178\u003c\/p\u003e \u003cp\u003eChanging Security Settings 179\u003c\/p\u003e \u003cp\u003eChanging permissions 180\u003c\/p\u003e \u003cp\u003eChanging ownership 181\u003c\/p\u003e \u003cp\u003eSharing Files 182\u003c\/p\u003e \u003cp\u003eAccess Control Lists 184\u003c\/p\u003e \u003cp\u003eSummary 186\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 8: Managing Filesystems 189\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Linux Filesystems 189\u003c\/p\u003e \u003cp\u003eExploring the Linux filesystem evolution 190\u003c\/p\u003e \u003cp\u003eLooking at the ext filesystem 190\u003c\/p\u003e \u003cp\u003eLooking at the ext2 filesystem 190\u003c\/p\u003e \u003cp\u003eDigging into journaling filesystems 191\u003c\/p\u003e \u003cp\u003eLooking at the ext3 filesystem 191\u003c\/p\u003e \u003cp\u003eLooking at the ext4 filesystem 191\u003c\/p\u003e \u003cp\u003eLooking at the JFS filesystem 192\u003c\/p\u003e \u003cp\u003eLooking at ReiserFS 192\u003c\/p\u003e \u003cp\u003eLooking at XFS 192\u003c\/p\u003e \u003cp\u003eUnderstanding the volume-managing filesystems 192\u003c\/p\u003e \u003cp\u003eLooking at the ZFS filesystem 193\u003c\/p\u003e \u003cp\u003eLooking at the Btrfs filesystem 193\u003c\/p\u003e \u003cp\u003eLooking at the Stratis filesystem 193\u003c\/p\u003e \u003cp\u003eWorking with Filesystems 194\u003c\/p\u003e \u003cp\u003eCreating partitions 194\u003c\/p\u003e \u003cp\u003eLooking at the \u003ci\u003efdisk \u003c\/i\u003eutility 194\u003c\/p\u003e \u003cp\u003eWorking with \u003ci\u003egdisk \u003c\/i\u003e197\u003c\/p\u003e \u003cp\u003eThe GNU \u003ci\u003eparted \u003c\/i\u003ecommand 198\u003c\/p\u003e \u003cp\u003eCreating a filesystem 199\u003c\/p\u003e \u003cp\u003eChecking and repairing a filesystem 201\u003c\/p\u003e \u003cp\u003eManaging Logical Volumes 202\u003c\/p\u003e \u003cp\u003eExploring LVM layout 203\u003c\/p\u003e \u003cp\u003ePhysical volume 203\u003c\/p\u003e \u003cp\u003eVolume group 203\u003c\/p\u003e \u003cp\u003eLogical volume 203\u003c\/p\u003e \u003cp\u003eUnderstanding the LVM in Linux 203\u003c\/p\u003e \u003cp\u003eCreate the PVs 204\u003c\/p\u003e \u003cp\u003eCreate a VG 204\u003c\/p\u003e \u003cp\u003eCreate an LV 205\u003c\/p\u003e \u003cp\u003eUsing the Linux LVM 206\u003c\/p\u003e \u003cp\u003eFormat and mount an LV 206\u003c\/p\u003e \u003cp\u003eGrowing or shrinking your VGs and LVs 206\u003c\/p\u003e \u003cp\u003eSummary 207\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 9: Installing Software 209\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Package Management 209\u003c\/p\u003e \u003cp\u003eInspecting the Debian-Based Systems 210\u003c\/p\u003e \u003cp\u003eManaging packages with \u003ci\u003eapt \u003c\/i\u003e211\u003c\/p\u003e \u003cp\u003eInstalling software packages with \u003ci\u003eapt \u003c\/i\u003e213\u003c\/p\u003e \u003cp\u003eUpgrading software with \u003ci\u003eapt \u003c\/i\u003e215\u003c\/p\u003e \u003cp\u003eUninstalling software with \u003ci\u003eapt \u003c\/i\u003e216\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eapt \u003c\/i\u003erepositories 218\u003c\/p\u003e \u003cp\u003eThe Red Hat–Based Systems 220\u003c\/p\u003e \u003cp\u003eListing installed packages 220\u003c\/p\u003e \u003cp\u003eInstalling software with \u003ci\u003ednf \u003c\/i\u003e221\u003c\/p\u003e \u003cp\u003eUpgrading software with \u003ci\u003ednf \u003c\/i\u003e223\u003c\/p\u003e \u003cp\u003eUninstalling software with \u003ci\u003ednf \u003c\/i\u003e223\u003c\/p\u003e \u003cp\u003eDealing with broken dependencies 223\u003c\/p\u003e \u003cp\u003eRPM repositories 224\u003c\/p\u003e \u003cp\u003eManaging Software Using Containers 225\u003c\/p\u003e \u003cp\u003eUsing snap containers 225\u003c\/p\u003e \u003cp\u003eUsing flatpak containers 227\u003c\/p\u003e \u003cp\u003eInstalling from Source Code 229\u003c\/p\u003e \u003cp\u003eSummary 232\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 10: Working with Editors 235\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eVisiting the vim Editor 235\u003c\/p\u003e \u003cp\u003eChecking your vim package 236\u003c\/p\u003e \u003cp\u003eExploring vim basics 237\u003c\/p\u003e \u003cp\u003eEditing data 240\u003c\/p\u003e \u003cp\u003eCopying and pasting 240\u003c\/p\u003e \u003cp\u003eSearching and substituting 241\u003c\/p\u003e \u003cp\u003eNavigating the nano Editor 242\u003c\/p\u003e \u003cp\u003eExploring the Emacs Editor 244\u003c\/p\u003e \u003cp\u003eChecking your Emacs package 245\u003c\/p\u003e \u003cp\u003eUsing Emacs on the console 246\u003c\/p\u003e \u003cp\u003eExploring the basics of Emacs 247\u003c\/p\u003e \u003cp\u003eEditing data 248\u003c\/p\u003e \u003cp\u003eCopying and pasting 249\u003c\/p\u003e \u003cp\u003eSearching and replacing 249\u003c\/p\u003e \u003cp\u003eUsing buffers in Emacs 250\u003c\/p\u003e \u003cp\u003eUsing windows in console mode Emacs 251\u003c\/p\u003e \u003cp\u003eUsing Emacs in a GUI 252\u003c\/p\u003e \u003cp\u003eExploring the KDE Family of Editors 253\u003c\/p\u003e \u003cp\u003eLooking at the KWrite editor 253\u003c\/p\u003e \u003cp\u003eLooking at the Kate editor 259\u003c\/p\u003e \u003cp\u003eExploring the GNOME Editor 263\u003c\/p\u003e \u003cp\u003eStarting gedit 264\u003c\/p\u003e \u003cp\u003eUnderstanding basic gedit features 265\u003c\/p\u003e \u003cp\u003eManaging plugins 268\u003c\/p\u003e \u003cp\u003eSummary 271\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart II: Shell Scripting Basics 273\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 11: Basic Script Building 275\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUsing Multiple Commands 275\u003c\/p\u003e \u003cp\u003eCreating a Script File 276\u003c\/p\u003e \u003cp\u003eDisplaying Messages 278\u003c\/p\u003e \u003cp\u003eUsing Variables 279\u003c\/p\u003e \u003cp\u003eEnvironment variables 280\u003c\/p\u003e \u003cp\u003eUser variables 281\u003c\/p\u003e \u003cp\u003eCommand substitution 283\u003c\/p\u003e \u003cp\u003eRedirecting Input and Output 284\u003c\/p\u003e \u003cp\u003eOutput redirection 285\u003c\/p\u003e \u003cp\u003eInput redirection 285\u003c\/p\u003e \u003cp\u003eEmploying Pipes 287\u003c\/p\u003e \u003cp\u003ePerforming Math 289\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eexpr \u003c\/i\u003ecommand 290\u003c\/p\u003e \u003cp\u003eUsing brackets 292\u003c\/p\u003e \u003cp\u003eA floating-point solution 293\u003c\/p\u003e \u003cp\u003eThe basics of \u003ci\u003ebc \u003c\/i\u003e293\u003c\/p\u003e \u003cp\u003eUsing \u003ci\u003ebc \u003c\/i\u003ein scripts 295\u003c\/p\u003e \u003cp\u003eExiting the Script 297\u003c\/p\u003e \u003cp\u003eChecking the exit status 297\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eexit \u003c\/i\u003ecommand 298\u003c\/p\u003e \u003cp\u003eWorking through a Practical Example 300\u003c\/p\u003e \u003cp\u003eSummary 301\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 12: Using Structured Commands 303\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eWorking with the \u003ci\u003eif-then \u003c\/i\u003eStatement 303\u003c\/p\u003e \u003cp\u003eExploring the \u003ci\u003eif-then-else \u003c\/i\u003eStatement 306\u003c\/p\u003e \u003cp\u003eNesting \u003ci\u003eif\u003c\/i\u003es 307\u003c\/p\u003e \u003cp\u003eTrying the \u003ci\u003etest \u003c\/i\u003eCommand 311\u003c\/p\u003e \u003cp\u003eUsing numeric comparisons 313\u003c\/p\u003e \u003cp\u003eUsing string comparisons 314\u003c\/p\u003e \u003cp\u003eLooking at string equality 315\u003c\/p\u003e \u003cp\u003eLooking at string order 316\u003c\/p\u003e \u003cp\u003eLooking at string size 318\u003c\/p\u003e \u003cp\u003eUsing file comparisons 320\u003c\/p\u003e \u003cp\u003eChecking directories 320\u003c\/p\u003e \u003cp\u003eChecking whether an object exists 321\u003c\/p\u003e \u003cp\u003eChecking for a file 322\u003c\/p\u003e \u003cp\u003eChecking for read access 324\u003c\/p\u003e \u003cp\u003eChecking for empty files 325\u003c\/p\u003e \u003cp\u003eChecking whether you can write to a file 326\u003c\/p\u003e \u003cp\u003eChecking whether you can run a file 327\u003c\/p\u003e \u003cp\u003eChecking ownership 328\u003c\/p\u003e \u003cp\u003eChecking default group membership 329\u003c\/p\u003e \u003cp\u003eChecking file date 330\u003c\/p\u003e \u003cp\u003eConsidering Compound Testing 331\u003c\/p\u003e \u003cp\u003eWorking with Advanced \u003ci\u003eif-then \u003c\/i\u003eFeatures 332\u003c\/p\u003e \u003cp\u003eUsing single parentheses 332\u003c\/p\u003e \u003cp\u003eUsing double parentheses 333\u003c\/p\u003e \u003cp\u003eUsing double brackets 335\u003c\/p\u003e \u003cp\u003eConsidering the \u003ci\u003ecase \u003c\/i\u003eCommand 335\u003c\/p\u003e \u003cp\u003eWorking through a Practical Example 337\u003c\/p\u003e \u003cp\u003eSummary 343\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 13: More Structured Commands 345\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eLooking at the \u003ci\u003efor \u003c\/i\u003eCommand 345\u003c\/p\u003e \u003cp\u003eReading values in a list 346\u003c\/p\u003e \u003cp\u003eReading complex values in a list 347\u003c\/p\u003e \u003cp\u003eReading a list from a variable 349\u003c\/p\u003e \u003cp\u003eReading values from a command 350\u003c\/p\u003e \u003cp\u003eChanging the field separator 351\u003c\/p\u003e \u003cp\u003eReading a directory using wildcards 352\u003c\/p\u003e \u003cp\u003eTrying the C-Style \u003ci\u003efor \u003c\/i\u003eCommand 354\u003c\/p\u003e \u003cp\u003eThe C language \u003ci\u003efor \u003c\/i\u003ecommand 355\u003c\/p\u003e \u003cp\u003eUsing multiple variables 356\u003c\/p\u003e \u003cp\u003eExploring the \u003ci\u003ewhile \u003c\/i\u003eCommand 357\u003c\/p\u003e \u003cp\u003eBasic \u003ci\u003ewhile \u003c\/i\u003eformat 357\u003c\/p\u003e \u003cp\u003eUsing multiple test commands 358\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003euntil \u003c\/i\u003eCommand 359\u003c\/p\u003e \u003cp\u003eNesting Loops 361\u003c\/p\u003e \u003cp\u003eLooping on File Data 364\u003c\/p\u003e \u003cp\u003eControlling the Loop 365\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003ebreak \u003c\/i\u003ecommand 365\u003c\/p\u003e \u003cp\u003eBreaking out of a single loop 365\u003c\/p\u003e \u003cp\u003eBreaking out of an inner loop 366\u003c\/p\u003e \u003cp\u003eBreaking out of an outer loop 367\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003econtinue \u003c\/i\u003ecommand 368\u003c\/p\u003e \u003cp\u003eProcessing the Output of a Loop 371\u003c\/p\u003e \u003cp\u003eWorking through a Few Practical Examples 372\u003c\/p\u003e \u003cp\u003eFinding executable files 373\u003c\/p\u003e \u003cp\u003eCreating multiple user accounts 374\u003c\/p\u003e \u003cp\u003eSummary 375\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 14: Handling User Input 377\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003ePassing Parameters 377\u003c\/p\u003e \u003cp\u003eReading parameters 377\u003c\/p\u003e \u003cp\u003eReading the script name 380\u003c\/p\u003e \u003cp\u003eTesting parameters 381\u003c\/p\u003e \u003cp\u003eUsing Special Parameter Variables 382\u003c\/p\u003e \u003cp\u003eCounting parameters 382\u003c\/p\u003e \u003cp\u003eGrabbing all the data 384\u003c\/p\u003e \u003cp\u003eBeing Shifty 386\u003c\/p\u003e \u003cp\u003eWorking with Options 388\u003c\/p\u003e \u003cp\u003eFinding your options 388\u003c\/p\u003e \u003cp\u003eProcessing simple options 388\u003c\/p\u003e \u003cp\u003eSeparating options from parameters 389\u003c\/p\u003e \u003cp\u003eProcessing options with values 391\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003egetopt \u003c\/i\u003ecommand 392\u003c\/p\u003e \u003cp\u003eLooking at the command format 392\u003c\/p\u003e \u003cp\u003eUsing \u003ci\u003egetopt \u003c\/i\u003ein your scripts 393\u003c\/p\u003e \u003cp\u003eAdvancing to \u003ci\u003egetopts \u003c\/i\u003e395\u003c\/p\u003e \u003cp\u003eStandardizing Options 398\u003c\/p\u003e \u003cp\u003eGetting User Input 399\u003c\/p\u003e \u003cp\u003eReading basics 399\u003c\/p\u003e \u003cp\u003eTiming Out 401\u003c\/p\u003e \u003cp\u003eReading with no display 402\u003c\/p\u003e \u003cp\u003eReading from a file 403\u003c\/p\u003e \u003cp\u003eWorking through a Practical Example 404\u003c\/p\u003e \u003cp\u003eSummary 408\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 15: Presenting Data 411\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Input and Output 411\u003c\/p\u003e \u003cp\u003eStandard file descriptors 412\u003c\/p\u003e \u003cp\u003eSTDIN 412\u003c\/p\u003e \u003cp\u003eSTDOUT 413\u003c\/p\u003e \u003cp\u003eSTDERR 414\u003c\/p\u003e \u003cp\u003eRedirecting errors 414\u003c\/p\u003e \u003cp\u003eRedirecting errors only 414\u003c\/p\u003e \u003cp\u003eRedirecting errors and data 415\u003c\/p\u003e \u003cp\u003eRedirecting Output in Scripts 416\u003c\/p\u003e \u003cp\u003eTemporary redirections 416\u003c\/p\u003e \u003cp\u003ePermanent redirections 417\u003c\/p\u003e \u003cp\u003eRedirecting Input in Scripts 418\u003c\/p\u003e \u003cp\u003eCreating Your Own Redirection 419\u003c\/p\u003e \u003cp\u003eCreating output file descriptors 419\u003c\/p\u003e \u003cp\u003eRedirecting file descriptors 420\u003c\/p\u003e \u003cp\u003eCreating input file descriptors 421\u003c\/p\u003e \u003cp\u003eCreating a read\/write file descriptor 422\u003c\/p\u003e \u003cp\u003eClosing file descriptors 423\u003c\/p\u003e \u003cp\u003eListing Open File Descriptors 424\u003c\/p\u003e \u003cp\u003eSuppressing Command Output 426\u003c\/p\u003e \u003cp\u003eUsing Temporary Files 427\u003c\/p\u003e \u003cp\u003eCreating a local temporary file 427\u003c\/p\u003e \u003cp\u003eCreating a temporary file in \u003ci\u003e\/\u003c\/i\u003etmp 428\u003c\/p\u003e \u003cp\u003eCreating a temporary directory 429\u003c\/p\u003e \u003cp\u003eLogging Messages 430\u003c\/p\u003e \u003cp\u003eWorking through a Practical Example 431\u003c\/p\u003e \u003cp\u003eSummary 433\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 16: Script Control 435\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eHandling Signals 435\u003c\/p\u003e \u003cp\u003eSignaling the Bash shell 435\u003c\/p\u003e \u003cp\u003eGenerating signals 436\u003c\/p\u003e \u003cp\u003eInterrupting a process 436\u003c\/p\u003e \u003cp\u003ePausing a process 437\u003c\/p\u003e \u003cp\u003eTrapping signals 438\u003c\/p\u003e \u003cp\u003eTrapping a script exit 440\u003c\/p\u003e \u003cp\u003eModifying or removing a trap 441\u003c\/p\u003e \u003cp\u003eRunning Scripts in Background Mode 443\u003c\/p\u003e \u003cp\u003eRunning in the background 443\u003c\/p\u003e \u003cp\u003eRunning multiple background jobs 445\u003c\/p\u003e \u003cp\u003eRunning Scripts without a Hang-up 447\u003c\/p\u003e \u003cp\u003eControlling the Job 448\u003c\/p\u003e \u003cp\u003eViewing jobs 448\u003c\/p\u003e \u003cp\u003eRestarting stopped jobs 450\u003c\/p\u003e \u003cp\u003eBeing Nice 451\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003enice \u003c\/i\u003ecommand 452\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003erenice \u003c\/i\u003ecommand 453\u003c\/p\u003e \u003cp\u003eRunning \u003ci\u003elike \u003c\/i\u003eClockwork 454\u003c\/p\u003e \u003cp\u003eScheduling a job using the \u003ci\u003eat \u003c\/i\u003ecommand 454\u003c\/p\u003e \u003cp\u003eUnderstanding the \u003ci\u003eat \u003c\/i\u003ecommand format 454\u003c\/p\u003e \u003cp\u003eRetrieving job output 455\u003c\/p\u003e \u003cp\u003eListing pending jobs 457\u003c\/p\u003e \u003cp\u003eRemoving jobs 457\u003c\/p\u003e \u003cp\u003eScheduling regular scripts 458\u003c\/p\u003e \u003cp\u003eLooking at the \u003ci\u003ecron \u003c\/i\u003etable 458\u003c\/p\u003e \u003cp\u003eBuilding the \u003ci\u003ecron \u003c\/i\u003etable 459\u003c\/p\u003e \u003cp\u003eViewing \u003ci\u003ecron \u003c\/i\u003edirectories 460\u003c\/p\u003e \u003cp\u003eLooking at the \u003ci\u003eanacron \u003c\/i\u003eprogram 460\u003c\/p\u003e \u003cp\u003eStarting scripts with a new shell 462\u003c\/p\u003e \u003cp\u003eWorking through a Practical Example 463\u003c\/p\u003e \u003cp\u003eSummary 469\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart III: Advanced Shell Scripting 471\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 17: Creating Functions 473\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Basic Script Functions 473\u003c\/p\u003e \u003cp\u003eCreating a function 474\u003c\/p\u003e \u003cp\u003eUsing functions 474\u003c\/p\u003e \u003cp\u003eReturning a Value from a Function 477\u003c\/p\u003e \u003cp\u003eThe default exit status 477\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003ereturn \u003c\/i\u003ecommand 478\u003c\/p\u003e \u003cp\u003eUsing function output 479\u003c\/p\u003e \u003cp\u003eUsing Variables in Functions 480\u003c\/p\u003e \u003cp\u003ePassing parameters to a function 480\u003c\/p\u003e \u003cp\u003eHandling variables in a function 482\u003c\/p\u003e \u003cp\u003eGlobal variables 483\u003c\/p\u003e \u003cp\u003eLocal variables 484\u003c\/p\u003e \u003cp\u003eInvestigating Array Variables and Functions 485\u003c\/p\u003e \u003cp\u003ePassing arrays to functions 485\u003c\/p\u003e \u003cp\u003eReturning arrays from functions 487\u003c\/p\u003e \u003cp\u003eConsidering Function Recursion 488\u003c\/p\u003e \u003cp\u003eCreating a Library 489\u003c\/p\u003e \u003cp\u003eUsing Functions on the Command Line 491\u003c\/p\u003e \u003cp\u003eCreating functions on the command line 491\u003c\/p\u003e \u003cp\u003eDefining functions in the \u003ci\u003ebashrc file \u003c\/i\u003e492\u003c\/p\u003e \u003cp\u003eDirectly defining functions 492\u003c\/p\u003e \u003cp\u003eSourcing function files 493\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 494\u003c\/p\u003e \u003cp\u003eDownloading and installing 494\u003c\/p\u003e \u003cp\u003eBuilding the library 495\u003c\/p\u003e \u003cp\u003eThe shtool library functions 496\u003c\/p\u003e \u003cp\u003eUsing the library 497\u003c\/p\u003e \u003cp\u003eSummary 497\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 18: Writing Scripts for Graphical Desktops 499\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eCreating Text Menus 499\u003c\/p\u003e \u003cp\u003eCreate the menu layout 499\u003c\/p\u003e \u003cp\u003eCreate the menu functions 501\u003c\/p\u003e \u003cp\u003eAdd the menu logic 502\u003c\/p\u003e \u003cp\u003ePutting it all together 502\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003eselect \u003c\/i\u003ecommand 504\u003c\/p\u003e \u003cp\u003eDoing Windows 505\u003c\/p\u003e \u003cp\u003eThe dialog package 506\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003emsgbox \u003c\/i\u003ewidget 507\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eyesno \u003c\/i\u003ewidget 508\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003einputbox \u003c\/i\u003ewidget 508\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003etextbox \u003c\/i\u003ewidget 510\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003emenu \u003c\/i\u003ewidget 511\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003efselect \u003c\/i\u003ewidget 512\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003edialog \u003c\/i\u003eoptions 513\u003c\/p\u003e \u003cp\u003eUsing the \u003ci\u003edialog \u003c\/i\u003ecommand in a script 515\u003c\/p\u003e \u003cp\u003eGetting Graphic 516\u003c\/p\u003e \u003cp\u003eThe KDE environment 517\u003c\/p\u003e \u003cp\u003ekdialog widgets 517\u003c\/p\u003e \u003cp\u003eUsing kdialog 519\u003c\/p\u003e \u003cp\u003eThe GNOME environment 521\u003c\/p\u003e \u003cp\u003ezenity Widgets 521\u003c\/p\u003e \u003cp\u003eUsing zenity in scripts 523\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 525\u003c\/p\u003e \u003cp\u003eSummary 529\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 19: Introducing \u003ci\u003esed \u003c\/i\u003eand \u003ci\u003egawk \u003c\/i\u003e531\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eManipulating Text 531\u003c\/p\u003e \u003cp\u003eGetting to know the \u003ci\u003esed \u003c\/i\u003eeditor 532\u003c\/p\u003e \u003cp\u003eDefining an editor command in the command line 533\u003c\/p\u003e \u003cp\u003eUsing multiple editor commands in the command line 534\u003c\/p\u003e \u003cp\u003eReading editor commands from a file 534\u003c\/p\u003e \u003cp\u003eGetting to know the \u003ci\u003egawk \u003c\/i\u003eprogram 535\u003c\/p\u003e \u003cp\u003eVisiting the \u003ci\u003egawk \u003c\/i\u003ecommand format 536\u003c\/p\u003e \u003cp\u003eReading the program script from the command line 536\u003c\/p\u003e \u003cp\u003eUsing data field variables 537\u003c\/p\u003e \u003cp\u003eUsing multiple commands in the program script 538\u003c\/p\u003e \u003cp\u003eReading the program from a file 539\u003c\/p\u003e \u003cp\u003eRunning scripts before processing data 539\u003c\/p\u003e \u003cp\u003eRunning scripts after processing data 540\u003c\/p\u003e \u003cp\u003eLooking at the \u003ci\u003esed \u003c\/i\u003eEditor Basic Commands 542\u003c\/p\u003e \u003cp\u003eIntroducing more substitution options 542\u003c\/p\u003e \u003cp\u003eSubstituting flags 542\u003c\/p\u003e \u003cp\u003eReplacing characters 543\u003c\/p\u003e \u003cp\u003eUsing addresses 544\u003c\/p\u003e \u003cp\u003eAddressing the numeric line 544\u003c\/p\u003e \u003cp\u003eUsing text pattern filters 545\u003c\/p\u003e \u003cp\u003eGrouping commands 546\u003c\/p\u003e \u003cp\u003eDeleting lines 547\u003c\/p\u003e \u003cp\u003eInserting and appending text 549\u003c\/p\u003e \u003cp\u003eChanging lines 551\u003c\/p\u003e \u003cp\u003eTransforming characters 552\u003c\/p\u003e \u003cp\u003ePrinting revisited 553\u003c\/p\u003e \u003cp\u003ePrinting lines 554\u003c\/p\u003e \u003cp\u003ePrinting line numbers 555\u003c\/p\u003e \u003cp\u003eListing lines 555\u003c\/p\u003e \u003cp\u003eUsing files with \u003ci\u003esed \u003c\/i\u003e556\u003c\/p\u003e \u003cp\u003eWriting to a file 556\u003c\/p\u003e \u003cp\u003eReading data from a file 557\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 559\u003c\/p\u003e \u003cp\u003eSummary 564\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 20: Regular Expressions 565\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eExploring Regular Expressions 565\u003c\/p\u003e \u003cp\u003eA definition 565\u003c\/p\u003e \u003cp\u003eTypes of regular expressions 567\u003c\/p\u003e \u003cp\u003eDefining BRE Patterns 567\u003c\/p\u003e \u003cp\u003ePlain text 567\u003c\/p\u003e \u003cp\u003eSpecial characters 569\u003c\/p\u003e \u003cp\u003eAnchor characters 570\u003c\/p\u003e \u003cp\u003eStarting at the beginning 570\u003c\/p\u003e \u003cp\u003eLooking for the ending 571\u003c\/p\u003e \u003cp\u003eCombining anchors 572\u003c\/p\u003e \u003cp\u003eThe dot character 572\u003c\/p\u003e \u003cp\u003eCharacter classes 573\u003c\/p\u003e \u003cp\u003eNegating character classes 575\u003c\/p\u003e \u003cp\u003eUsing ranges 576\u003c\/p\u003e \u003cp\u003eSpecial character classes 577\u003c\/p\u003e \u003cp\u003eThe asterisk 578\u003c\/p\u003e \u003cp\u003eTrying Out Extended Regular Expressions 579\u003c\/p\u003e \u003cp\u003eThe question mark 579\u003c\/p\u003e \u003cp\u003eThe plus sign 580\u003c\/p\u003e \u003cp\u003eUsing braces 581\u003c\/p\u003e \u003cp\u003eThe pipe symbol 582\u003c\/p\u003e \u003cp\u003eGrouping expressions 583\u003c\/p\u003e \u003cp\u003eWorking Through Some Practical Examples 584\u003c\/p\u003e \u003cp\u003eCounting directory files 584\u003c\/p\u003e \u003cp\u003eValidating a phone number 585\u003c\/p\u003e \u003cp\u003eParsing an email address 587\u003c\/p\u003e \u003cp\u003eSummary 589\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 21: Advanced \u003ci\u003esed \u003c\/i\u003e591\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eLooking at Multiline Commands 591\u003c\/p\u003e \u003cp\u003eNavigating the next command 592\u003c\/p\u003e \u003cp\u003eUsing the single-line next command 592\u003c\/p\u003e \u003cp\u003eCombining lines of text 593\u003c\/p\u003e \u003cp\u003eNavigating the multiline delete command 595\u003c\/p\u003e \u003cp\u003eNavigating the multiline print command 596\u003c\/p\u003e \u003cp\u003eHolding Space 598\u003c\/p\u003e \u003cp\u003eNegating a Command 599\u003c\/p\u003e \u003cp\u003eChanging the Flow 602\u003c\/p\u003e \u003cp\u003eBranching 603\u003c\/p\u003e \u003cp\u003eTesting 605\u003c\/p\u003e \u003cp\u003eReplacing via a Pattern 606\u003c\/p\u003e \u003cp\u003eUsing the ampersand 606\u003c\/p\u003e \u003cp\u003eReplacing individual words 607\u003c\/p\u003e \u003cp\u003ePlacing \u003ci\u003esed \u003c\/i\u003eCommands in Scripts 608\u003c\/p\u003e \u003cp\u003eUsing wrappers 608\u003c\/p\u003e \u003cp\u003eRedirecting \u003ci\u003esed \u003c\/i\u003eoutput 609\u003c\/p\u003e \u003cp\u003eCreating \u003ci\u003esed \u003c\/i\u003eUtilities 610\u003c\/p\u003e \u003cp\u003eSpacing with double lines 610\u003c\/p\u003e \u003cp\u003eSpacing files that may have blanks 611\u003c\/p\u003e \u003cp\u003eNumbering lines in a file 612\u003c\/p\u003e \u003cp\u003ePrinting last lines 613\u003c\/p\u003e \u003cp\u003eDeleting lines 614\u003c\/p\u003e \u003cp\u003eDeleting consecutive blank lines 615\u003c\/p\u003e \u003cp\u003eDeleting leading blank lines 616\u003c\/p\u003e \u003cp\u003eDeleting trailing blank lines 616\u003c\/p\u003e \u003cp\u003eRemoving HTML tags 617\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 619\u003c\/p\u003e \u003cp\u003eSummary 624\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 22: Advanced \u003ci\u003egawk k \u003c\/i\u003e627\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUsing Variables 627\u003c\/p\u003e \u003cp\u003eBuilt-in variables 628\u003c\/p\u003e \u003cp\u003eThe field and record separator variables 628\u003c\/p\u003e \u003cp\u003eData variables 631\u003c\/p\u003e \u003cp\u003eUser-defined variables 634\u003c\/p\u003e \u003cp\u003eAssigning variables in scripts 634\u003c\/p\u003e \u003cp\u003eAssigning variables on the command line 635\u003c\/p\u003e \u003cp\u003eWorking with Arrays 636\u003c\/p\u003e \u003cp\u003eDefining array variables 636\u003c\/p\u003e \u003cp\u003eIterating through array variables 637\u003c\/p\u003e \u003cp\u003eDeleting array variables 638\u003c\/p\u003e \u003cp\u003eConsidering Patterns 638\u003c\/p\u003e \u003cp\u003eRegular expressions 639\u003c\/p\u003e \u003cp\u003eThe matching operator 639\u003c\/p\u003e \u003cp\u003eMathematical expressions 640\u003c\/p\u003e \u003cp\u003eStructured Commands 641\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003eif \u003c\/i\u003estatement 641\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003ewhile \u003c\/i\u003estatement 643\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003edo-while \u003c\/i\u003estatement 644\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003efor \u003c\/i\u003estatement 645\u003c\/p\u003e \u003cp\u003ePrinting with Formats 645\u003c\/p\u003e \u003cp\u003eUsing Built-in Functions 648\u003c\/p\u003e \u003cp\u003eMathematical functions 649\u003c\/p\u003e \u003cp\u003eString functions 650\u003c\/p\u003e \u003cp\u003eTime functions 652\u003c\/p\u003e \u003cp\u003eTrying Out User-Defined Functions 653\u003c\/p\u003e \u003cp\u003eDefining a function 653\u003c\/p\u003e \u003cp\u003eUsing your functions 654\u003c\/p\u003e \u003cp\u003eCreating a function library 654\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 655\u003c\/p\u003e \u003cp\u003eSummary 657\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 23: Working with Alternative Shells 659\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eConsidering the Dash Shell 659\u003c\/p\u003e \u003cp\u003eLooking at the Dash Shell Features 661\u003c\/p\u003e \u003cp\u003eThe Dash command-line parameters 661\u003c\/p\u003e \u003cp\u003eThe Dash environment variables 662\u003c\/p\u003e \u003cp\u003eDefault environment variables 662\u003c\/p\u003e \u003cp\u003ePositional parameters 663\u003c\/p\u003e \u003cp\u003eUser-defined environment variables 663\u003c\/p\u003e \u003cp\u003eThe Dash built-in commands 664\u003c\/p\u003e \u003cp\u003eScripting in Dash 665\u003c\/p\u003e \u003cp\u003eCreating Dash scripts 665\u003c\/p\u003e \u003cp\u003eThings that won’t work 665\u003c\/p\u003e \u003cp\u003eUsing arithmetic 666\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003etest \u003c\/i\u003ecommand 666\u003c\/p\u003e \u003cp\u003eThe \u003ci\u003efunction \u003c\/i\u003ecommand 667\u003c\/p\u003e \u003cp\u003eExploring the zsh Shell 668\u003c\/p\u003e \u003cp\u003eViewing Parts of the zsh shell 668\u003c\/p\u003e \u003cp\u003eShell options 669\u003c\/p\u003e \u003cp\u003eBuilt-in commands 670\u003c\/p\u003e \u003cp\u003eCore built-in commands 670\u003c\/p\u003e \u003cp\u003eAdd-in modules 673\u003c\/p\u003e \u003cp\u003eViewing, adding, and removing modules 673\u003c\/p\u003e \u003cp\u003eScripting with zsh 674\u003c\/p\u003e \u003cp\u003eMathematical operations 674\u003c\/p\u003e \u003cp\u003ePerforming calculations 674\u003c\/p\u003e \u003cp\u003eMathematical functions 675\u003c\/p\u003e \u003cp\u003eStructured commands 676\u003c\/p\u003e \u003cp\u003eFunctions 677\u003c\/p\u003e \u003cp\u003eWorking Through a Practical Example 677\u003c\/p\u003e \u003cp\u003eSummary 678\u003c\/p\u003e \u003cp\u003e\u003cb\u003ePart IV: Creating and Managing Practical Scripts 679\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 24: Writing Simple Script Utilities 681\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003ePerforming Backups 681\u003c\/p\u003e \u003cp\u003eBacking up files daily 682\u003c\/p\u003e \u003cp\u003eObtaining the required functions 682\u003c\/p\u003e \u003cp\u003eCreating a daily archive location 685\u003c\/p\u003e \u003cp\u003eCreating a daily backup script 686\u003c\/p\u003e \u003cp\u003eRunning the daily archive script 688\u003c\/p\u003e \u003cp\u003eCreating an hourly archive script 689\u003c\/p\u003e \u003cp\u003eRunning the hourly archive script 692\u003c\/p\u003e \u003cp\u003eManaging Account Deletion 693\u003c\/p\u003e \u003cp\u003eObtaining the required functions 693\u003c\/p\u003e \u003cp\u003eGetting the correct account name 693\u003c\/p\u003e \u003cp\u003eCreating a function to get the correct account name 695\u003c\/p\u003e \u003cp\u003eVerifying the entered account name 696\u003c\/p\u003e \u003cp\u003eDetermining whether the account exists 698\u003c\/p\u003e \u003cp\u003eRemoving any account processes 699\u003c\/p\u003e \u003cp\u003eFinding account files 702\u003c\/p\u003e \u003cp\u003eRemoving the account 702\u003c\/p\u003e \u003cp\u003eCreating the script 703\u003c\/p\u003e \u003cp\u003eRunning the script 708\u003c\/p\u003e \u003cp\u003eMonitoring Your System 710\u003c\/p\u003e \u003cp\u003eObtaining the default shell audit functions 710\u003c\/p\u003e \u003cp\u003eObtaining the permission audit functions 714\u003c\/p\u003e \u003cp\u003eCreating the script 716\u003c\/p\u003e \u003cp\u003eRunning the script 719\u003c\/p\u003e \u003cp\u003eSummary 721\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 25: Getting Organized 723\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Version Control 723\u003c\/p\u003e \u003cp\u003eWorking directory 724\u003c\/p\u003e \u003cp\u003eStaging area 725\u003c\/p\u003e \u003cp\u003eLooking at the local repository 725\u003c\/p\u003e \u003cp\u003eExploring a remote repository 726\u003c\/p\u003e \u003cp\u003eBranching 726\u003c\/p\u003e \u003cp\u003eCloning 726\u003c\/p\u003e \u003cp\u003eUsing Git for VCS 727\u003c\/p\u003e \u003cp\u003eSetting Up Your Git Environment 727\u003c\/p\u003e \u003cp\u003eCommitting with Git 732\u003c\/p\u003e \u003cp\u003eSummary 739\u003c\/p\u003e \u003cp\u003eAppendix A: Quick Guide to Bash Commands 741\u003c\/p\u003e \u003cp\u003eAppendix B: Quick Guide to \u003ci\u003esed \u003c\/i\u003eand \u003ci\u003egawk \u003c\/i\u003e755\u003c\/p\u003e \u003cp\u003eIndex 767\u003c\/p\u003e \u003cp\u003e\u003cb\u003eRICHARD BLUM\u003c\/b\u003e has over three decades of experience working as a system and network administrator. He is the author of several Linux books and is an accomplished online Linux instructor.\u003c\/p\u003e \u003cp\u003e\u003cb\u003eCHRISTINE BRESNAHAN\u003c\/b\u003e is an Adjunct Professor at Ivy Tech Community College where she teaches Linux certification and Python classes. She is the author of several Linux books, including the \u003ci\u003eCompTIA Linux+ Study Guide\u003c\/i\u003e, Fourth Edition.\u003c\/p\u003e  \u003cp\u003e\u003cb\u003eBecome proficient in the Linux Shell with this indispensable and approachable resource\u003c\/b\u003e \u003c\/p\u003e\u003cp\u003eNewly revised and comprehensively updated, the Fourth Edition of \u003ci\u003eLinux Command Line and Shell Scripting Bible\u003c\/i\u003e provides readers with accessible instruction on the basic and advanced topics they'll need to learn and master Linux shell scripting. Accomplished authors Richard Blum and Christine Bresnahan walk you through real-world Linux environments using new functional script examples. \u003c\/p\u003e\u003cp\u003eYou'll learn how to write simple script utilities, as well as how to produce advanced scripts using sed, gawk, and regular expressions. Discover how to get started with Linux using various distributions, how to issue basic commands, use Linux environment variables, and understand Linux file permissions. The book also teaches you how to install software and work with Linux Shell script editors like vim, nano, and emacs. \u003c\/p\u003e\u003cp\u003ePerfect for Linux system administrators seeking tutorials on how to write and use shell scripts or a quick reference book for commands and procedures. \u003ci\u003eLinux Command Line and Shell Scripting Bible\u003c\/i\u003e also belongs on the bookshelves of Linux enthusiasts who want to dig deeper into their favorite operating system. \u003c\/p\u003e\u003cp\u003eWritten in an approachable and jargon-free style designed to help you get the most out of your Linux Shell scripting experience, this book will teach you how to: \u003c\/p\u003e\u003cul\u003e \u003cli\u003e\u003cb\u003eCreate and manage practical scripts, including how to write script utilities\u003c\/b\u003e\u003c\/li\u003e \u003cli\u003e\u003cb\u003eWork with alternative shells, like dash and zsh\u003c\/b\u003e\u003c\/li\u003e \u003cli\u003e\u003cb\u003eMake the best use of the gawk and sed editors\u003c\/b\u003e\u003c\/li\u003e \u003cli\u003e\u003cb\u003eUse and define regular and extended regular expressions\u003c\/b\u003e\u003c\/li\u003e \u003cli\u003e\u003cb\u003eWrite Linux Shell scripts for graphical desktops in both KDE and GNOME\u003c\/b\u003e\u003c\/li\u003e \u003cli\u003e\u003cb\u003eCreate basic and advanced functions\u003c\/b\u003e\u003c\/li\u003e \u003c\/ul\u003e","brand":"Wiley","offers":[{"title":"Default Title","offer_id":47989533475045,"sku":"NP9781119700913","price":52.0,"currency_code":"USD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1842\/7735\/files\/9781119700913.jpg?v=1761784493","url":"https:\/\/k12savings.com\/products\/linux-command-line-and-shell-scripting-bible-isbn-9781119700913","provider":"K12savings","version":"1.0","type":"link"}