Linux Shell Scripting Bootcamp
暫譯: Linux Shell 腳本訓練營

James Kent Lewis

  • 出版商: Packt Publishing
  • 出版日期: 2017-07-24
  • 定價: $1,380
  • 售價: 6.0$828
  • 語言: 英文
  • 頁數: 208
  • 裝訂: Paperback
  • ISBN: 1787281108
  • ISBN-13: 9781787281103
  • 相關分類: LinuxCommand Line
  • 立即出貨 (庫存=1)

相關主題

商品描述

Key Features

  • Understand expressions and variables and how to use them practically
  • Familiarize yourself with the various text filtering tools available in Linux
  • A fast-paced and concise guide that gets you well versed with linux shell scripting.

Book Description

Linux Shell Scripting Bootcamp is all about learning the essentials of script creation, validating parameters, and checking for the existence of files and other items needed by the script.

We will use scripts to explore iterative operations using loops and learn different types of loop statements, with their differences. Along with this, we will also create a numbered backup script for backup files.

Further, you will get well-versed with how variables work on a Linux system and how they relate to scripts. You'll also learn how to create and call subroutines in a script and create interactive scripts. The most important archive commands, zip and tar, are also discussed for performing backups. Later, you will dive deeper by understanding the use of wget and curl scripts and the use of checksum and file encryption in further chapters.

Finally, you will learn how to debug scripts and scripting best practices that will enable you to write a great code every time! By the end of the book, you will be able to write shell scripts that can dig data from the web and process it efficiently.

What you will learn

  • Get acquainted with the basics of a shell script to serve as a refresher for more advanced topics
  • Learn different ways to create and run a script
  • Discuss the passing and verification of parameters, along with the verification of other items.
  • Understand the different forms of conditions and loops, and go over the sleep command in detail
  • Learn about different ways to handle the reporting of return codes
  • Create an interactive script by reading the keyboard and use subroutines and interrupts
  • Create scripts to perform backups and go over the use of encryption tools and checksums
  • Use wget and curl in scripts to get data directly from the Internet

About the Author

James Kent Lewis has been in the computer industry for over 35 years. He started out writing BASIC programs in high school and used punch cards in college for his Pascal, Fortran, COBOL, and assembly language classes. He himself learned the C programming language by writing various utilities, including a fully-functional text editor, which he uses everyday. He started out using DOS and AIX, and then OS/2. Linux is now his operating system of choice. Jim has worked in the past for several companies, including IBM, Texas Instruments, Tandem, Raytheon, Hewlett-Packard, and others. Most of these positions dealt with low-level device drivers and operating system internals. In his spare time he likes to create video games in Java.He has written articles for IBM Developer Works and has one patent.

Table of Contents

  1. Getting started with shell scripting
  2. Working with variables
  3. Using loops and the sleep command
  4. Creating and calling subroutines
  5. Creating Interactive Scripts
  6. Automating Tasks with Scripts
  7. Working with Files
  8. Working with wget and curl
  9. Debugging scripts
  10. Scripting Best Practices

商品描述(中文翻譯)

#### 主要特點
- 理解表達式和變數及其實際使用方法
- 熟悉 Linux 中各種文本過濾工具
- 一本快速且簡潔的指南,讓你熟悉 Linux Shell 腳本編寫

#### 書籍描述
《Linux Shell 腳本訓練營》專注於學習腳本創建的基本要素、驗證參數以及檢查腳本所需的文件和其他項目的存在性。

我們將使用腳本來探索使用迴圈的迭代操作,並學習不同類型的迴圈語句及其差異。此外,我們還將創建一個編號的備份腳本來備份文件。

進一步地,你將熟悉變數在 Linux 系統中的運作方式及其與腳本的關係。你還將學習如何在腳本中創建和調用子例程,以及創建互動式腳本。最重要的壓縮命令 zip 和 tar 也將被討論,以執行備份。稍後,你將深入了解 wget 和 curl 腳本的使用,以及在後續章節中使用校驗和和文件加密。

最後,你將學習如何調試腳本和最佳的腳本編寫實踐,這將使你每次都能編寫出優秀的代碼!到書籍結束時,你將能夠編寫能夠從網路中提取數據並高效處理的 Shell 腳本。

#### 你將學到的內容
- 熟悉 Shell 腳本的基本知識,作為進一步高級主題的複習
- 學習創建和運行腳本的不同方法
- 討論參數的傳遞和驗證,以及其他項目的驗證
- 理解不同形式的條件和迴圈,並詳細了解 sleep 命令
- 學習處理返回碼報告的不同方法
- 通過讀取鍵盤創建互動式腳本,並使用子例程和中斷
- 創建執行備份的腳本,並了解加密工具和校驗和的使用
- 在腳本中使用 wget 和 curl 直接從互聯網獲取數據

#### 關於作者
**James Kent Lewis** 在計算機行業工作超過 35 年。他在高中時期開始編寫 BASIC 程式,並在大學時期使用打孔卡進行 Pascal、Fortran、COBOL 和組合語言課程的學習。他通過編寫各種實用工具學習 C 程式語言,包括一個功能完整的文本編輯器,並且每天都在使用。Jim 最初使用 DOS 和 AIX,然後是 OS/2。現在 Linux 是他首選的操作系統。Jim 曾在多家公司工作,包括 IBM、德州儀器、Tandem、雷神公司、惠普等。這些職位大多涉及低層設備驅動程序和操作系統內部。在空閒時間,他喜歡用 Java 創建視頻遊戲。他曾為 IBM Developer Works 撰寫文章,並擁有一項專利。

#### 目錄
1. 開始使用 Shell 腳本
2. 使用變數
3. 使用迴圈和 sleep 命令
4. 創建和調用子例程
5. 創建互動式腳本
6. 使用腳本自動化任務
7. 處理文件
8. 使用 wget 和 curl
9. 調試腳本
10. 腳本最佳實踐