舉報

會員
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.
目錄(354章)
倒序
- 封面
- 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 更新時間:2021-07-23 19:18:23
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- arc42 by Example
- Python高級編程
- SQL基礎教程(視頻教學版)
- 計算機應用基礎實踐教程
- 執劍而舞:用代碼創作藝術
- 移動增值應用開發技術導論
- SQL Server 2008 R2數據庫技術及應用(第3版)
- Python商務數據分析(微課版)
- R的極客理想:量化投資篇
- LabVIEW數據采集
- JavaEE架構與程序設計
- Android應用程序設計
- iOS Development with Xamarin Cookbook
- 趣學數據結構
- Appcelerator Titanium Smartphone App Development Cookbook
- 交互設計語言:與萬物對話的藝術(全兩冊)
- Java程序設計
- Python for Secret Agents
- 片上系統設計思想與源代碼分析
- C語言程序設計:現代方法(第2版)
- Python商業數據分析:零售和電子商務案例詳解(雙色)
- Netty源碼剖析與應用
- Splunk Essentials(Second Edition)
- Grunt Cookbook
- Python數據科學指南
- Qt 5 Blueprints
- Kali Linux Wireless Penetration Testing:Beginner's Guide
- Flink設計與實現:核心原理與源碼解析
- Raspberry Pi Super Cluster