舉報(bào)

會員
Bash Cookbook
InLinux,oneofthemostcommonlyusedandmostpowerfultoolsistheBashshell.Withitscollectionofengagingrecipes,BashCookbooktakesyouthroughaseriesofexercisesdesignedtoteachyouhowtoeffectivelyusetheBashshellinordertocreateandexecuteyourownscripts.ThebookstartsbyintroducingyoutothebasicsofusingtheBashshell,alsoteachingyouthefundamentalsofgeneratinganyinputfromacommand.Withthehelpofanumberofexercises,youwillgettogripswiththeautomationofdailytasksforsysadminsandpowerusers.Onceyouhaveahands-onunderstandingofthesubject,youwillmoveontoexploringmoreadvancedprojectsthatcansolvereal-worldproblemscomprehensivelyonaLinuxsystem.Inadditiontothis,youwilldiscoverprojectssuchascreatinganapplicationwithamenu,beginningscriptsonstartup,parsinganddisplayinghuman-readableinformation,andexecutingremotecommandswithauthenticationusingself-generatedSecureShell(SSH)keys.Bytheendofthisbook,youwillhavegainedsignificantexperienceofsolvingreal-worldproblems,fromautomatingroutinetaskstomanagingyoursystemsandcreatingyourownscripts.
最新章節(jié)
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- How it works...
- How to do it...
- Getting ready
- Writing high-quality scripts by example
品牌:中圖公司
上架時(shí)間:2021-07-23 17:43:12
出版社:Packt Publishing
本書數(shù)字版權(quán)由中圖公司提供,并由其授權(quán)上海閱文信息技術(shù)有限公司制作發(fā)行
- Leave a review - let other readers know what you think 更新時(shí)間:2021-07-23 19:18:23
- Other Books You May Enjoy
- How it works...
- How to do it...
- Getting ready
- Writing high-quality scripts by example
- How it works...
- How to do it...
- Getting ready
- Recording terminal sessions for automation
- How it works...
- How to do it...
- Getting ready
- Compiling and installing your own Bash shell
- How it works...
- How to do it...
- Getting ready
- Creating simple frontend GUIs for Bash scripts
- How it works...
- How to do it...
- Getting ready
- Echoing output to raw terminal devices
- How it works...
- How to do it...
- Getting ready
- Adding aliases and altering user paths/variables
- How it works...
- How to do it...
- Getting ready
- Improving your shell – GCC and command line colors
- How it works...
- How to do it...
- Getting ready
- Creating a config file and using it in tandem with your scripts
- How it works...
- How to do it...
- Getting ready
- Avoiding command not found warnings/errors and improving portability
- How it works...
- How to do it...
- Getting ready
- Writing one-line conditional statements and loops
- How it works...
- How to do it...
- Getting ready
- Calculating and reducing the runtime of a script
- Introduction
- Advanced Scripting Techniques
- How it works…
- How to do it…
- Getting ready
- Using chroot and restricted Bash shells to secure scripts
- How it works…
- How to do it…
- Getting ready
- Using Bash to monitor battery life and optimize it
- How it works…
- How to do it…
- Getting ready
- Using Bash scripts to monitor udev input
- How it works…
- How to do it…
- Getting ready
- Creating a poor man's incremental remote backup
- How it works…
- How to do it…
- Getting ready
- Parsing a GitHub project and generate a report
- How it works…
- How to do it…
- Getting ready
- Creating a simple NAT and DMZ firewall
- How it works…
- How to do it…
- Getting ready
- Playing and managing audio from Bash
- How it works…
- How to do it…
- Getting ready
- Blocking IP addresses from failed SSH attempts
- How it works…
- How to do it…
- Getting ready
- Making a simple IRC chat bot logger
- How it works…
- How to do it…
- Getting ready
- Scraping the web and collecting files
- How it works…
- How to do it…
- Getting ready
- Parsing RSS feeds and output HTML
- How it works…
- How to do it…
- Getting ready
- Creating a lame utility HTTP server
- Introduction
- Writing Bash to Win and Profit
- How it works...
- How to do it...
- Getting ready
- Encrypting/decrypting files from a script
- How it works...
- How to do it...
- Getting ready
- Fetching time from different locations
- How it works...
- How to do it...
- Getting ready
- Finding binary dependencies
- How it works...
- How to do it...
- Getting ready
- Capturing network traffic headlessly
- How it works...
- How to do it...
- Getting ready
- Browsing the web from the CLI
- How it works...
- How to do it...
- Getting ready
- Mounting network file systems and retrieving files
- How it works...
- How to do it...
- Getting ready
- Checking for file integrity and tampering
- How it works...
- How to do it...
- Getting ready
- Creating graphics and presentations on the CLI
- How it works...
- How to do it...
- Getting ready
- Backing up and erasing media disks and partitions with DD
- How it works...
- How to do it...
- Getting ready
- Creating Syslog entries and generating an alarm
- Introduction
- Scripts for Power Users
- How it works...
- How to do it...
- Creating users and groups systematically
- How it works...
- How to do it...
- Creating and configuring cron Jobs for task scheduling
- How to do it...
- Getting ready
- Creating SSH keys for password less remote access
- How it works...
- How to do it...
- Getting ready
- Accessing SQL databases remotely or locally
- How it works...
- How to do it...
- Getting ready
- Using Linux iptables for a firewall
- How it works...
- Adding configuration to /etc/logrotate.d/
- How to do it...
- Getting ready
- Rotating files from RAM to storage for log rotation
- How it works...
- How to do it...
- Getting ready
- Compressing and archiving files
- How it works...
- How to do it...
- Getting ready
- Monitoring directories and files
- How it works...
- How to do it...
- Getting ready
- Configuring basic network connectivity
- How it works...
- How to do it...
- Getting ready
- Gathering network information and connectivity diagnostics
- How it works...
- How to do it...
- Getting ready
- Gathering and aggregating system information
- Introduction
- Scripts for System Administration Tasks
- How it works...
- How to do it...
- Getting ready
- Executing your script on startup
- How it works...
- How to do it...
- Getting ready
- Creating a file-in-file-out program and running processes in parallel
- How it works...
- How to do it...
- Getting ready
- Leveraging timeout when waiting for command completion
- How it works...
- How to do it...
- Getting ready
- Using temporary files and lock files in your program
- How it works...
- How to do it...
- Getting ready
- Generating and trapping signals for cleanup
- How it works...
- How to do it...
- Getting ready
- Making a simple multi-level user menu using select
- How it works...
- How to do it...
- Getting ready
- Sanitizing user input and for repeatable results
- How it works...
- How to do it...
- Getting ready
- Invoking commands when they require permissions
- How it works...
- How to do it...
- Getting ready
- Keeping programs/scripts running after logoff
- How it works...
- How to do it...
- Getting ready
- Running a program continuously (forever) using looping constructs or recursion
- Introduction
- Making a Script Behave Like a Daemon
- How it works...
- How to do it...
- Getting ready
- Generating datasets and random files of various size
- How it works...
- How to do it...
- Getting ready
- Joining and splitting files at arbitrary positions
- How it works...
- How to do it...
- Getting ready
- Finding and deleting duplicate files or directories
- How it works...
- How to do it...
- Getting ready
- Crawling filesystem directories and printing a tree
- How it works...
- How to do it...
- Creating symbolic links and using them effectively
- How it works...
- How to do it...
- Getting ready
- Creating a diff of two files and patching
- How it works...
- How to do it...
- Getting ready
- Searching for files by name and/or extension
- How it works...
- How to do it...
- Getting ready
- Viewing files from various angles – head tail less and more
- Introduction
- Understanding and Gaining File System Mastery
- How it works...
- How to do it...
- Getting ready
- Reading delimited data and altered output format
- How it works...
- How to do it...
- Getting ready
- Using file attributes with conditional logic
- How it works...
- How to do it...
- Getting ready
- Calculating statistics and reducing duplicates based on file contents
- How it works...
- How to do it...
- Getting ready
- Readying your script for different languages with internationalization
- How it works...
- How to do it...
- Getting ready
- Formatting your data/output using echo and printf
- How it works...
- How to do it...
- Getting ready
- Using SED and AWK to remove/replace substrings
- How it works...
- How to do it...
- Getting ready
- Striping/altering/sorting/deleting/searching strings with Bash only
- How it works...
- How to do it...
- Getting ready
- Math and calculations in script
- How it works...
- How to do it...
- Getting ready
- Using wildcards and regexes
- How it works...
- How to do it...
- Getting ready
- Basic searching for strings and files
- Introduction
- Acting Like a Typewriter and File Explorer
- Summary
- Getting additional information about commands
- Passing your program flags
- Getting program input parameters
- Redirection and pipe bonzanza
- Linking commands pipes and input/output
- Return code 101
- Retrieving return codes and output
- Including/importing a library script and using external functions
- Including source files
- Using a function with parameters within a for loop
- Using functions and parameters
- Until loop
- Do while loop
- For loop
- Basic loops
- Basic case statement
- Case/switch statements and loop constructs
- Nested if statements
- Evaluating strings
- Evaluating binary numbers
- Conditional logic using if else and elseif
- Hidden Bash variables and reserved words
- Hands-on variable assignment
- Creating and using basic variables
- Your first Bash script with Vim
- Getting started with Bash and CLI fundamentals
- Crash Course in Bash
- Reviews
- Get in touch
- See also
- There's more...
- How it works...
- How to do it...
- Getting ready
- Sections
- Conventions used
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the authors
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Bash Cookbook
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Bash Cookbook
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Conventions used
- Sections
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Get in touch
- Reviews
- Crash Course in Bash
- Getting started with Bash and CLI fundamentals
- Your first Bash script with Vim
- Creating and using basic variables
- Hands-on variable assignment
- Hidden Bash variables and reserved words
- Conditional logic using if else and elseif
- Evaluating binary numbers
- Evaluating strings
- Nested if statements
- Case/switch statements and loop constructs
- Basic case statement
- Basic loops
- For loop
- Do while loop
- Until loop
- Using functions and parameters
- Using a function with parameters within a for loop
- Including source files
- Including/importing a library script and using external functions
- Retrieving return codes and output
- Return code 101
- Linking commands pipes and input/output
- Redirection and pipe bonzanza
- Getting program input parameters
- Passing your program flags
- Getting additional information about commands
- Summary
- Acting Like a Typewriter and File Explorer
- Introduction
- Basic searching for strings and files
- Getting ready
- How to do it...
- How it works...
- Using wildcards and regexes
- Getting ready
- How to do it...
- How it works...
- Math and calculations in script
- Getting ready
- How to do it...
- How it works...
- Striping/altering/sorting/deleting/searching strings with Bash only
- Getting ready
- How to do it...
- How it works...
- Using SED and AWK to remove/replace substrings
- Getting ready
- How to do it...
- How it works...
- Formatting your data/output using echo and printf
- Getting ready
- How to do it...
- How it works...
- Readying your script for different languages with internationalization
- Getting ready
- How to do it...
- How it works...
- Calculating statistics and reducing duplicates based on file contents
- Getting ready
- How to do it...
- How it works...
- Using file attributes with conditional logic
- Getting ready
- How to do it...
- How it works...
- Reading delimited data and altered output format
- Getting ready
- How to do it...
- How it works...
- Understanding and Gaining File System Mastery
- Introduction
- Viewing files from various angles – head tail less and more
- Getting ready
- How to do it...
- How it works...
- Searching for files by name and/or extension
- Getting ready
- How to do it...
- How it works...
- Creating a diff of two files and patching
- Getting ready
- How to do it...
- How it works...
- Creating symbolic links and using them effectively
- How to do it...
- How it works...
- Crawling filesystem directories and printing a tree
- Getting ready
- How to do it...
- How it works...
- Finding and deleting duplicate files or directories
- Getting ready
- How to do it...
- How it works...
- Joining and splitting files at arbitrary positions
- Getting ready
- How to do it...
- How it works...
- Generating datasets and random files of various size
- Getting ready
- How to do it...
- How it works...
- Making a Script Behave Like a Daemon
- Introduction
- Running a program continuously (forever) using looping constructs or recursion
- Getting ready
- How to do it...
- How it works...
- Keeping programs/scripts running after logoff
- Getting ready
- How to do it...
- How it works...
- Invoking commands when they require permissions
- Getting ready
- How to do it...
- How it works...
- Sanitizing user input and for repeatable results
- Getting ready
- How to do it...
- How it works...
- Making a simple multi-level user menu using select
- Getting ready
- How to do it...
- How it works...
- Generating and trapping signals for cleanup
- Getting ready
- How to do it...
- How it works...
- Using temporary files and lock files in your program
- Getting ready
- How to do it...
- How it works...
- Leveraging timeout when waiting for command completion
- Getting ready
- How to do it...
- How it works...
- Creating a file-in-file-out program and running processes in parallel
- Getting ready
- How to do it...
- How it works...
- Executing your script on startup
- Getting ready
- How to do it...
- How it works...
- Scripts for System Administration Tasks
- Introduction
- Gathering and aggregating system information
- Getting ready
- How to do it...
- How it works...
- Gathering network information and connectivity diagnostics
- Getting ready
- How to do it...
- How it works...
- Configuring basic network connectivity
- Getting ready
- How to do it...
- How it works...
- Monitoring directories and files
- Getting ready
- How to do it...
- How it works...
- Compressing and archiving files
- Getting ready
- How to do it...
- How it works...
- Rotating files from RAM to storage for log rotation
- Getting ready
- How to do it...
- Adding configuration to /etc/logrotate.d/
- How it works...
- Using Linux iptables for a firewall
- Getting ready
- How to do it...
- How it works...
- Accessing SQL databases remotely or locally
- Getting ready
- How to do it...
- How it works...
- Creating SSH keys for password less remote access
- Getting ready
- How to do it...
- Creating and configuring cron Jobs for task scheduling
- How to do it...
- How it works...
- Creating users and groups systematically
- How to do it...
- How it works...
- Scripts for Power Users
- Introduction
- Creating Syslog entries and generating an alarm
- Getting ready
- How to do it...
- How it works...
- Backing up and erasing media disks and partitions with DD
- Getting ready
- How to do it...
- How it works...
- Creating graphics and presentations on the CLI
- Getting ready
- How to do it...
- How it works...
- Checking for file integrity and tampering
- Getting ready
- How to do it...
- How it works...
- Mounting network file systems and retrieving files
- Getting ready
- How to do it...
- How it works...
- Browsing the web from the CLI
- Getting ready
- How to do it...
- How it works...
- Capturing network traffic headlessly
- Getting ready
- How to do it...
- How it works...
- Finding binary dependencies
- Getting ready
- How to do it...
- How it works...
- Fetching time from different locations
- Getting ready
- How to do it...
- How it works...
- Encrypting/decrypting files from a script
- Getting ready
- How to do it...
- How it works...
- Writing Bash to Win and Profit
- Introduction
- Creating a lame utility HTTP server
- Getting ready
- How to do it…
- How it works…
- Parsing RSS feeds and output HTML
- Getting ready
- How to do it…
- How it works…
- Scraping the web and collecting files
- Getting ready
- How to do it…
- How it works…
- Making a simple IRC chat bot logger
- Getting ready
- How to do it…
- How it works…
- Blocking IP addresses from failed SSH attempts
- Getting ready
- How to do it…
- How it works…
- Playing and managing audio from Bash
- Getting ready
- How to do it…
- How it works…
- Creating a simple NAT and DMZ firewall
- Getting ready
- How to do it…
- How it works…
- Parsing a GitHub project and generate a report
- Getting ready
- How to do it…
- How it works…
- Creating a poor man's incremental remote backup
- Getting ready
- How to do it…
- How it works…
- Using Bash scripts to monitor udev input
- Getting ready
- How to do it…
- How it works…
- Using Bash to monitor battery life and optimize it
- Getting ready
- How to do it…
- How it works…
- Using chroot and restricted Bash shells to secure scripts
- Getting ready
- How to do it…
- How it works…
- Advanced Scripting Techniques
- Introduction
- Calculating and reducing the runtime of a script
- Getting ready
- How to do it...
- How it works...
- Writing one-line conditional statements and loops
- Getting ready
- How to do it...
- How it works...
- Avoiding command not found warnings/errors and improving portability
- Getting ready
- How to do it...
- How it works...
- Creating a config file and using it in tandem with your scripts
- Getting ready
- How to do it...
- How it works...
- Improving your shell – GCC and command line colors
- Getting ready
- How to do it...
- How it works...
- Adding aliases and altering user paths/variables
- Getting ready
- How to do it...
- How it works...
- Echoing output to raw terminal devices
- Getting ready
- How to do it...
- How it works...
- Creating simple frontend GUIs for Bash scripts
- Getting ready
- How to do it...
- How it works...
- Compiling and installing your own Bash shell
- Getting ready
- How to do it...
- How it works...
- Recording terminal sessions for automation
- Getting ready
- How to do it...
- How it works...
- Writing high-quality scripts by example
- Getting ready
- How to do it...
- How it works...
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時(shí)間:2021-07-23 19:18:23