Mastering Bash
暫譯: 精通 Bash

Giorgio Zarrelli

  • 出版商: Packt Publishing
  • 出版日期: 2017-06-23
  • 售價: $2,000
  • 貴賓價: 9.5$1,900
  • 語言: 英文
  • 頁數: 502
  • 裝訂: Paperback
  • ISBN: 1784396877
  • ISBN-13: 9781784396879
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Your one stop guide to making the most out of Bash programming

About This Book

  • From roots to leaves, learn how to program in Bash and automate daily tasks, pouring some spice in your scripts
  • Daemonize a script and make a real service of it, ensuring it's available at any time to process user-fed data or commands
  • This book provides functional examples that show you practical applications of commands

Who This Book Is For

If you're a power user or system administrator involved in writing Bash scripts to automate tasks, then this book is for you. This book is also ideal for advanced users who are engaged in complex daily tasks.

What You Will Learn

  • Understand Bash right from the basics and progress to an advanced level
  • Customise your environment and automate system routine tasks
  • Write structured scripts and create a command-line interface for your scripts
  • Understand arrays, menus, and functions
  • Securely execute remote commands using ssh
  • Write Nagios plugins to automate your infrastructure checks
  • Interact with web services, and a Slack notification script
  • Find out how to execute subshells and take advantage of parallelism
  • Explore inter-process communication and write your own daemon

In Detail

System administration is an everyday effort that involves a lot of tedious tasks, and devious pits. Knowing your environment is the key to unleashing the most powerful solution that will make your life easy as an administrator, and show you the path to new heights. Bash is your Swiss army knife to set up your working or home environment as you want, when you want.

This book will enable you to customize your system step by step, making your own real, virtual, home out of it. The journey will take you swiftly through the basis of the shell programming in Bash to more interesting and challenging tasks. You will be introduced to one of the most famous open source monitoring systems-Nagios, and write complex programs with it in any languages. You'll see how to perform checks on your sites and applications.

Moving on, you'll discover how to write your own daemons so you can create your services and take advantage of inter-process communication to let your scripts talk to each other. So, despite these being everyday tasks, you'll have a lot of fun on the way. By the end of the book, you will have gained advanced knowledge of Bash that will help you automate routine tasks and manage your systems.

Style and approach

This book presents step-by-step instructions and expert advice on working with Bash and writing scripts. Starting from the basics, this book serves as a reference manual where you can find handy solutions and advice to make your scripts flexible and powerful.

商品描述(中文翻譯)

您的 Bash 程式設計最佳實用指南

關於本書



  • 從基礎到進階,學習如何在 Bash 中編程並自動化日常任務,為您的腳本增添一些風味

  • 將腳本轉為守護進程,並使其成為真正的服務,確保隨時可用以處理用戶提供的數據或命令

  • 本書提供功能範例,展示命令的實際應用

本書適合誰閱讀


如果您是高級用戶或系統管理員,負責編寫 Bash 腳本以自動化任務,那麼本書適合您。本書也非常適合從事複雜日常任務的進階用戶。

您將學到什麼



  • 從基礎開始理解 Bash,並逐步提升至高級水平

  • 自定義您的環境並自動化系統例行任務

  • 編寫結構化腳本並為您的腳本創建命令行介面

  • 理解陣列、菜單和函數

  • 使用 ssh 安全地執行遠程命令

  • 編寫 Nagios 插件以自動化基礎設施檢查

  • 與網絡服務互動,以及編寫 Slack 通知腳本

  • 了解如何執行子殼並利用並行性

  • 探索進程間通信並編寫自己的守護進程

詳細內容


系統管理是一項日常工作,涉及許多繁瑣的任務和隱藏的陷阱。了解您的環境是釋放最強大解決方案的關鍵,這將使您作為管理員的生活變得輕鬆,並指引您通往新高度。Bash 是您設置工作或家庭環境的瑞士軍刀,隨時隨地滿足您的需求。


本書將使您能夠逐步自定義您的系統,打造出真正的虛擬家庭。這段旅程將迅速帶您從 Bash 的基本殼程式編程過渡到更有趣和具挑戰性的任務。您將接觸到最著名的開源監控系統之一——Nagios,並用任何語言編寫複雜的程序。您將學會如何對您的網站和應用程序進行檢查。


接下來,您將發現如何編寫自己的守護進程,以便創建服務並利用進程間通信讓您的腳本互相交流。因此,儘管這些是日常任務,但您在過程中會獲得很多樂趣。在本書結束時,您將獲得高級的 Bash 知識,幫助您自動化例行任務並管理系統。

風格與方法


本書提供逐步指導和專家建議,幫助您使用 Bash 和編寫腳本。從基礎開始,本書作為參考手冊,您可以在其中找到便捷的解決方案和建議,使您的腳本靈活且強大。