Linux Shell Scripting Bootcamp

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 Scripting Bootcamp》是一本關於學習腳本創建、驗證參數以及檢查腳本所需的文件和其他項目是否存在的基礎知識的書籍。


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


此外,您將深入了解變量在Linux系統中的工作原理以及它們與腳本的關係。您還將學習如何在腳本中創建和調用子程序以及創建交互式腳本。還討論了最重要的存檔命令zip和tar,用於執行備份。隨後,您將通過進一步的章節了解wget和curl腳本的使用以及校驗和文件加密的使用。


最後,您將學習如何調試腳本以及腳本編寫的最佳實踐,這將使您每次都能編寫出優秀的代碼!通過閱讀本書,您將能夠編寫能夠從網絡中提取數據並高效處理的shell腳本。


你將學到什麼



  • 熟悉shell腳本的基礎知識,作為更高級主題的複習

  • 學習創建和運行腳本的不同方法

  • 討論參數的傳遞和驗證,以及其他項目的驗證

  • 了解不同形式的條件和循環,並詳細介紹sleep命令

  • 了解處理返回代碼報告的不同方法

  • 通過讀取鍵盤創建交互式腳本,並使用子程序和中斷

  • 創建執行備份的腳本,並介紹加密工具和校驗和文件加密的使用

  • 在腳本中使用wget和curl直接從互聯網獲取數據


關於作者


James Kent Lewis在計算機行業工作超過35年。他從高中開始寫BASIC程序,並在大學時代使用打孔卡片學習Pascal、Fortran、COBOL和組合語言。他通過編寫各種實用程序(包括一個完全功能的文本編輯器)來學習C編程語言,並且現在每天都在使用它。他最初使用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. 腳本編寫的最佳實踐