Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying The Ultimate Linux Shell Scripting Guide
  • Table Of Contents Toc
  • Feedback & Rating feedback
The Ultimate Linux Shell Scripting Guide

The Ultimate Linux Shell Scripting Guide

By : Donald A. Tevault
4.9 (8)
close
close
The Ultimate Linux Shell Scripting Guide

The Ultimate Linux Shell Scripting Guide

4.9 (8)
By: Donald A. Tevault

Overview of this book

Dive into the world of Linux shell scripting with this hands-on guide. If you’re comfortable using the command line on Unix or Linux but haven’t fully explored Bash, this book is for you. It’s designed for programmers familiar with languages like Python, JavaScript, or PHP who want to make the most of shell scripting. This isn’t just another theory-heavy book—you’ll learn by doing. Each chapter builds on the last, taking you from shell basics to writing practical scripts that solve real-world problems. With nearly a hundred interactive labs, you’ll gain hands-on experience in automation, system administration, and troubleshooting. While Bash is the primary focus, you'll also get a look at Z Shell and PowerShell, expanding your skills and adaptability. From mastering command redirection and pipelines to writing scripts that work across different Unix-like systems, this book equips you for real-world Linux challenges. By the end, you'll be equipped to write efficient shell scripts that streamline your workflow and improve system automation.
Table of Contents (26 chapters)
close
close
24
Other Books You May Enjoy
25
Index

Obtaining Input from Commands

Let’s start with something simple, by obtaining some basic process information. On the Fedora Server virtual machine that’s running Apache, search for all ps aux output lines that contain the httpd pattern, like so:

donnie@fedora:~$ ps aux | awk '/httpd/ {print $0}'
root        1072  0.0  0.2  19108 10796 ?        Ss   14:36   0:01 /usr/sbin/httpd -DFOREGROUND
apache      1111  0.0  0.1  19204  6788 ?        S    14:36   0:00 /usr/sbin/httpd -DFOREGROUND
apache      1112  0.0  0.2 2158280 8448 ?        Sl   14:36   0:02 /usr/sbin/httpd -DFOREGROUND
apache      1113  0.0  0.2 2420488 8592 ?        Sl   14:36   0:03 /usr/sbin/httpd -DFOREGROUND
apache      1114  0.0  0.2 2158280 8448 ?        Sl   14:36   0:02 /usr/sbin/httpd -DFOREGROUND
donnie      1908  0.0  0.0   9196  3768 pts/0    S+   17:13   0:00 awk /httpd/ {print $0}
donnie@fedora:~$

Next, let’s say that we want to see all processes that are owned by the...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
The Ultimate Linux Shell Scripting Guide
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon