Have a personal or library account? Click to login
Scripting Cover

Scripting

Automation with Bash, PowerShell, and Python

Paid access
|Jan 2025
Product purchase options

Master automation with Bash, PowerShell, and Python in real-world scenarios. Learn to write scripts that solve everyday IT tasks in fewer lines of code.

Key Features

  • A comparative guide to Bash, PowerShell, and Python for solving diverse IT automation tasks
  • Practical scripting scenarios that reflect real-world problems faced by IT professionals
  • Structured walkthroughs that move from language basics to advanced multi-tool integrations

Book Description

This comprehensive scripting guide empowers system administrators, developers, and power users to automate repetitive IT tasks across platforms using three major scripting languages: Bash, PowerShell, and Python. The book opens with foundational scripting concepts and showcases what you can accomplish with just ten lines of code. It continues with in-depth chapters on each language, emphasizing syntax, control structures, error handling, and modularity.
Readers will explore practical techniques for managing files, parsing text, utilizing regular expressions, and working with JSON, XML, and INI formats. The book dives into job automation with cron and Task Scheduler, secure communication via SSH, and scripting in professional environments with tools like Visual Studio Code and Git.
The final section applies scripting to real-world cases, including system backups, image processing, web scraping, API consumption, database interactions, cloud integration, and virtual machine automation. With this book, readers build a strong scripting toolkit to efficiently manage modern IT workflows.

What you will learn

  • Automate tasks using concise Bash, PowerShell, and Python
  • Create scripts for backups, logging, and web scraping
  • Manage files, loops, and errors across all three languages
  • Parse text and logs using filters, pipes, and regex tools
  • Integrate scripting with Git, APIs, SSH, and cloud services
  • Schedule jobs with cron and Windows Task Scheduler

Who this book is for

Ideal for system administrators, DevOps professionals, and developers seeking practical automation skills. Readers should have basic familiarity with command-line interfaces and general programming concepts to get the most out of this book.

Table of Contents

  1. Scripting: Doing One Thing
  2. Ten Times Ten Lines
  3. Bash and Zsh
  4. PowerShell
  5. Python
  6. Linux Toolbox
  7. cmdlets for PowerShell
  8. Analyzing Texts with Filters and Pipes
  9. Regular Expressions
  10. JSON, XML, and INI
  11. Running Scripts Automatically
  12. SSH
  13. Visual Studio Code
  14. Git
  15. Backups
  16. Image Processing
  17. Web Scraping
  18. Using REST APIs
  19. Databases
  20. Scripting in the Cloud
  21. Virtual Machines
PDF ISBN: 978-1-80602-486-5
Publisher: Packt Publishing Limited
Publication date: 2025
Language: English
Pages: 473