Linux shell scripting cookbook : over 110 incredibly effective recipes to solve real-world problems, automate tedious tasks, and take advantage of Linux's newest features

Do amazing things with the shell About This Book Become an expert in creating powerful shell scripts and explore the full possibilities of the shell Automate any administrative task you could imagine, with shell scripts Packed with easy-to-follow recipes on new features on Linux, particularly, Debia...

Full description

Saved in:
Bibliographic Details
Main Authors: Flynt, Clif, (Author), Tushar, Shantanu, (Author), Lakshman, Sarath, (Author)
Format: eBook
Language: English
Published: Birmingham, UK : Packt Publishing, 2017.
Edition: Third edition.
Subjects:
ISBN: 9781785882388
1785882384
9781785881985
Physical Description: 1 online resource (1 volume) : illustrations

Cover

Table of contents

LEADER 13687cam a2200457 i 4500
001 kn-ocn992147697
003 OCoLC
005 20240717213016.0
006 m o d
007 cr cn|||||||||
008 170628s2017 enka o 000 0 eng d
040 |a UMI  |b eng  |e rda  |e pn  |c UMI  |d IDEBK  |d TOH  |d OCLCF  |d OCLCQ  |d TEFOD  |d CEF  |d KSU  |d UAB  |d N$T  |d CZL  |d OCLCO  |d OCLCQ  |d OCLCO  |d OCLCQ  |d DXU 
020 |a 9781785882388  |q (electronic bk.) 
020 |a 1785882384  |q (electronic bk.) 
020 |z 9781785881985 
035 |a (OCoLC)992147697  |z (OCoLC)1240434783 
100 1 |a Flynt, Clif,  |e author. 
245 1 0 |a Linux shell scripting cookbook :  |b over 110 incredibly effective recipes to solve real-world problems, automate tedious tasks, and take advantage of Linux's newest features /  |c Clif Flynt, Sarath Lakshman, Shantanu Tushar. 
250 |a Third edition. 
264 1 |a Birmingham, UK :  |b Packt Publishing,  |c 2017. 
300 |a 1 online resource (1 volume) :  |b illustrations 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
506 |a Plný text je dostupný pouze z IP adres počítačů Univerzity Tomáše Bati ve Zlíně nebo vzdáleným přístupem pro zaměstnance a studenty 
520 |a Do amazing things with the shell About This Book Become an expert in creating powerful shell scripts and explore the full possibilities of the shell Automate any administrative task you could imagine, with shell scripts Packed with easy-to-follow recipes on new features on Linux, particularly, Debian-based, to help you accomplish even the most complex tasks with ease Who This Book Is For If you are a beginner or an intermediate Linux user who wants to master the skill of quickly writing scripts and automate tasks without reading the entire man pages, then this book is for you. You can start writing scripts and one-liners by simply looking at the relevant recipe and its descriptions without any working knowledge of shell scripting or Linux. Intermediate / advanced users, system administrators / developers, and programmers can use this book as a reference when they face problems while coding. What You Will Learn Interact with websites via scripts Write shell scripts to mine and process data from the Web Automate system backups and other repetitive tasks with crontab Create, compress, and encrypt archives of your critical data. Configure and monitor Ethernet and wireless networks Monitor and log network and system activity Tune your system for optimal performance Improve your system's security Identify resource hogs and network bottlenecks Extract audio from video files Create web photo albums Use git or fossil to manage revision control and interact with FOSS projects Create and maintain Linux containers and Virtual Machines Run a private Cloud server In Detail The shell is the most powerful tool your computer provides. Despite having it at their fingertips, many users are unaware of how much the shell can accomplish. Using the shell, you can generate databases and web pages from sets of files, automate monotonous admin tasks such as system backups, monitor your system's health and activity, identify network bottlenecks and system resource hogs, and more. This book will show you how to do all this and much more. This book, now in its third edition, describes the exciting new features in the newest Linux distributions to help you accomplish more than you imagine. It shows how to use simple commands to automate complex tasks, automate web interactions, download videos, set up containers and cloud servers, and even get free SSL certificates. Starting with the basics of the shell, you will learn simple commands and how to apply them to real-world is... 
505 0 |a Cover -- Copyright -- Credits -- About the Authors -- About the Reviewer -- www.PacktPub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Shell Something Out -- Introduction -- Displaying output in a terminal -- Getting ready -- How to do it... -- How it works... -- There's more... -- Escaping newline in echo -- Printing a colored output -- Using variables and environment variables -- Getting ready -- How to do it... -- There's more... -- Finding the length of a string -- Identifying the current shell -- Checking for super user -- Modifying the Bash prompt string (username@hostname:~) -- Function to prepend to environment variables -- How to do it... -- How it works... -- Math with the shell -- How to do it... -- Playing with file descriptors and redirection -- Getting ready -- How to do it... -- How it works... -- There's more... -- Redirection from a file to a command -- Redirecting from a text block enclosed within a script -- Custom file descriptors -- Arrays and associative arrays -- Getting ready -- How to do it... -- There's more... -- Defining associative arrays -- Listing of array indexes -- Visiting aliases -- How to do it... -- There's more... -- Escaping aliases -- Listing aliases -- Grabbing information about the terminal -- Getting ready -- How to do it... -- Getting and setting dates and delays -- Getting ready -- How to do it... -- How it works... -- There's more... -- Producing delays in a script -- Debugging the script -- How to do it... -- How it works... -- There's more... -- Shebang hack -- Functions and arguments -- How to do it... -- There's more... -- The recursive function -- Reading the return value (status) of a command -- Passing arguments to commands -- Sending output from one command to another -- Getting ready -- How to do it... -- There's more... -- Spawning a separate process with subshell. 
505 8 |a Subshell quoting to preserve spacing and the newline character -- Reading n characters without pressing the return key -- How to do it... -- Running a command until it succeeds -- How to do it... -- How it works... -- There's more... -- A faster approach -- Adding a delay -- Field separators and iterators -- Getting ready -- How to do it... -- Comparisons and tests -- How to do it... -- Customizing bash with configuration files -- How to do it... -- Chapter 2: Have a Good Command -- Introduction -- Concatenating with cat -- How to do it... -- There's more... -- Getting rid of extra blank lines -- Displaying tabs as ^I -- Line numbers -- Recording and playing back terminal sessions -- Getting ready -- How to do it... -- How it works... -- Finding files and file listing -- Getting ready -- How to do it... -- There's more... -- Search based on name or regular expression match -- Negating arguments -- Searching based on the directory depth -- Searching based on file type -- Searching by file timestamp -- Searching based on file size -- Matching based on file permissions and ownership -- Performing actions on files with find -- Deleting based on file matches -- Executing a command -- Skipping specified directories when using the find command -- Playing with xargs -- Getting ready -- How to do it... -- How it works... -- There's more... -- Passing formatted arguments to a command by reading stdin -- Using xargs with find -- Counting the number of lines of C code in a source code directory -- While and subshell trick with stdin -- Translating with tr -- Getting ready -- How to do it... -- How it works... -- There's more... -- Deleting characters using tr -- Complementing character sets -- Squeezing characters with tr -- Character classes -- Checksum and verification -- Getting ready -- How to do it... -- How it works... -- There's more. 
505 8 |a Checksum for directories -- Cryptographic tools and hashes -- How to do it... -- Sorting unique and duplicate lines -- Getting ready -- How to do it... -- How it works... -- There's more... -- Sorting according to keys or columns -- uniq -- Temporary file naming and random numbers -- How to do it... -- How it works... -- Splitting files and data -- How to do it... -- There's more... -- Specifying a filename prefix for the split files -- Slicing filenames based on extensions -- How to do it... -- How it works... -- Renaming and moving files in bulk -- Getting ready -- How to do it... -- How it works... -- Spell-checking and dictionary manipulation -- How to do it... -- How it works... -- Automating interactive input -- Getting ready -- How to do it... -- How it works... -- There's more... -- Automating with expect -- Making commands quicker by running parallel processes -- How to do it... -- How it works... -- There's more... -- Examining a directory, files and subdirectories in it -- Getting ready -- How to do it... -- Generating a tree view of a directory. -- Generating a summary of files and sub-directories -- Chapter 3: File In, File Out -- Introduction -- Generating files of any size -- How to do it... -- The intersection and set difference (A-B) on text files -- Getting ready -- How to do it... -- How it works... -- Finding and deleting duplicate files -- Getting ready -- How to do it... -- How it works... -- Working with file permissions, ownership, and the sticky bit -- How to do it... -- There's more... -- Changing ownership -- Setting the sticky bit -- Applying permissions recursively to files -- Applying ownership recursively -- Running an executable as a different user (setuid) -- Making files immutable -- Getting ready -- How to do it... -- Generating blank files in bulk -- Getting ready -- How to do it. 
505 8 |a Finding symbolic links and their targets -- How to do it... -- How it works... -- Enumerating file type statistics -- Getting ready -- How to do it... -- How it works... -- Using loopback files -- How to do it... -- How it works... -- There's more... -- Creating partitions inside loopback images -- Mounting loopback disk images with partitions more quickly -- Mounting ISO files as loopback -- Flush changing immediately with sync -- Creating ISO files and hybrid ISO -- Getting ready -- How to do it... -- There's more... -- Hybrid ISO that boots off a flash drive or hard disk -- Burning an ISO from the command line -- Playing with the CD-ROM tray -- Finding the difference between files, and patching -- How to do it... -- There's more... -- Generating difference against directories -- Using head and tail for printing the last or first 10 lines -- How to do it... -- Listing only directories -- alternative methods -- Getting ready -- How to do it... -- How it works... -- Fast command-line navigation using pushd and popd -- Getting ready -- How to do it... -- There's more... -- pushd and popd are useful when there are more than three directory paths used. However, when you use only two locations, there is an alternative and easier way, that is, cd -. -- Counting the number of lines, words, and characters in a file -- How to do it... -- Printing the directory tree -- Getting ready -- How to do it... -- There's more... -- HTML output for tree -- Manipulating video and image files -- Getting ready -- Extracting Audio from a movie file (mp4) -- How to do it... -- Making a video from a set of still images -- How to do it... -- How it works... -- Creating a panned video from a still camera shot -- How to do it... -- How it works... -- Chapter 4: Texting and Driving -- Introduction -- Using regular expressions -- How to do it... -- Position markers -- Identifiers. 
505 8 |a Count modifiers -- Other -- There's more... -- How it works... -- There's more... -- Treatment of special characters -- Visualizing regular expressions -- Searching and mining text inside a file with grep -- How to do it... -- There's more... -- Recursively searching many files -- Ignoring case in patterns -- grep by matching multiple patterns -- Including and excluding files in a grep search -- Using grep with xargs with the zero-byte suffix -- Silent output for grep -- Printing lines before and after text matches -- Cutting a file column-wise with cut -- How to do it... -- There's more -- Specifying the range of characters or bytes as fields -- Using sed to perform text replacement -- How to do it... -- There's more... -- Removing blank lines -- Performing replacement directly in the file -- Matched string notation () -- Substring match notation (\1) -- Combining multiple expressions -- Quoting -- Using awk for advanced text processing -- Getting ready -- How to do it... -- How it works... -- There's more... -- Special variables -- Passing an external variable to awk -- Reading a line explicitly using getline -- Filtering lines processed by awk with filter patterns -- Setting delimiters for fields -- Reading the command output from awk -- Associative arrays in Awk -- Using loop inside awk -- String manipulation functions in awk -- Finding the frequency of words used in a given file -- Getting ready -- How to do it... -- How it works... -- See also -- Compressing or decompressing JavaScript -- Getting ready -- How to do it... -- How it works... -- See also -- Merging multiple files as columns -- How to do it... -- See also -- Printing the nth word or column in a file or line -- How to do it... -- See also -- Printing text between line numbers or patterns -- Getting ready -- How to do it... -- See also -- Printing lines in the reverse order. 
590 |a Knovel  |b Knovel (All titles) 
630 0 0 |a Linux. 
630 0 7 |a Linux  |2 fast 
650 0 |a Scripting languages (Computer science) 
650 0 |a Operating systems (Computers) 
655 7 |a elektronické knihy  |7 fd186907  |2 czenas 
655 9 |a electronic books  |2 eczenas 
700 1 |a Tushar, Shantanu,  |e author. 
700 1 |a Lakshman, Sarath,  |e author. 
856 4 0 |u https://proxy.k.utb.cz/login?url=https://app.knovel.com/hotlink/toc/id:kpLSSCD008/linux-shell-scripting?kpromoter=marc  |y Full text