Skip to the content
Skip to content
Top Menu
Jun 09, 2026
  • About Us
  • FAQ
  • Write For Us
  • Tech News
  • Facebook
  • Twitter
  • LinkedIn
  • Twitter
  • fa-youtube
Join to our facebook group
logo
  • Home
  • Linux
    • RHEL-Centos
    • Rocky Linux
    • Ubuntu
    • Linux Opinion
    • Linux General
    • Shell Scripting
  • LINUX COMMANDS
  • Cheat Sheets
    • Linux
    • Docker
  • Linux Interview Questions
    • BASIC
  • Enterprise Linux
Main Menu

Shell Scripting

awk command in Linux
Shell Scripting

AWK Made Simple for Linux Beginners (Part 26 / 34)

Jun 09, 2026 Jun 09, 2026 - by sharon - Leave a Comment

× It’s time to stop using grep as your primary debugging and search tool, and it’s time to understand why. You may have already identified the column of interest and located the pattern you need to find. However, when you start combining cut, grep, and sort to extract that information, things can become confusing very […]

Read More
sed substitution command example in Linux terminal
Shell Scripting

Advanced sed Made Simple with Real Examples (Part 25 / 34)

Jun 06, 2026 Jun 06, 2026 - by sharon - Leave a Comment

When your deployment script runs at the last minute on a Friday, everything appears fine except that the old database hostname is still present in the configuration file. After a few minutes of searching through files with grep, staring blankly into space, and attempting to run the script again, someone finally asks, "Did you sed […]

Read More
how bash uses sed for text editing
Shell Scripting

How Bash Uses sed for Text Editing (Part 24 / 34 )

Jun 04, 2026 Jun 04, 2026 - by sharon - Leave a Comment

Anyone familiar with Bash scripting has probably needed to replace a configuration file value using sed as part of a pre-deployment process. If your variable (for example, one defined in your script) is not being replaced by sed, you are likely experiencing what is known as the "quoting trap", a problem that nearly every sed […]

Read More
grep for text processing in Bash
Shell Scripting

How Bash Uses grep for Text Processing (Part 23 / 34 )

Jun 03, 2026 Jun 03, 2026 - by sharon - Leave a Comment

The point where grep really shines is when you are staring at a log file with 40,000 entries and only one error buried somewhere in the middle, and you desperately need to see it on your screen right now. I once dealt with intermittent 500 errors on a production server. I spent hours manually scanning […]

Read More
bash function arguments and return values explained with examples
Shell Scripting

Bash Function Arguments and Return Values Explained (Part 22 / 34)

May 30, 2026 May 30, 2026 - by sharon - Leave a Comment

You wrote a Bash function that returned the value you were trying to see. Then, you started searching through variables, only to find that none of them contained anything. This can happen to anyone. The problem is not with your function (it works exactly as designed) or with Bash itself (it behaves the way it […]

Read More
bash functions
Shell Scripting

Functions in Bash: Writing Reusable Code (Part 21 / 34)

May 29, 2026 May 29, 2026 - by sharon - Leave a Comment

You are sitting down to write a 300-line deployment script and realize the same 15 lines of disk-space checking code appear in four different places. If you make a change in one location, you now have to go hunting through your entire codebase to see where else those lines of code exist. And if you […]

Read More
bash loops example in Linux terminal
Shell Scripting

Learn Bash Loops the Easy Way to Automate Tasks (Part 20 / 34)

May 28, 2026 May 28, 2026 - by sharon - Leave a Comment

I am knee-deep in a production project. I want my script to take 200+ server log files from a directory, read each one individually, and never require me to touch the keyboard while it runs. At that point, Bash loops stop being about tutorials and start becoming practical. I have been there too. My first […]

Read More
bash while and until loops examples
Shell Scripting

While and Until Loops in Bash (Part 19 / 34)

May 27, 2026 May 27, 2026 - by sharon - Leave a Comment

You create an executable script that continually retries a failed network or database connection, but it only runs once and exits. In other cases, the condition logic is reversed, causing the loop to continue indefinitely. If either situation sounds familiar, you are in the right place. I once wrote a backup script for a production […]

Read More
bash for loop
Shell Scripting

For Loops Explained with Real Use Cases (Part 18 / 34)

May 25, 2026 May 25, 2026 - by sharon - Leave a Comment

The decision to use a bash for loop comes down to how much time you want to spend typing file names. If you've ever found yourself with 200 files all needing the same operation run on them, as I did during a log cleanup task, then using a for loop will save you hours of […]

Read More
bash script arithmetic operators
Shell Scripting

How to Perform Arithmetic in Bash Scripts (Part 17 / 34)

May 24, 2026 May 24, 2026 - by sharon - Leave a Comment

Writing a script to calculate disk usage percentages and send an email alert when a threshold is reached might sound straightforward at first. However, after writing half the script, trying something as simple as result=$a/$b can leave you staring at bash wondering what just happened. No error message. No useful output. Just silence. That exact […]

Read More
bash single vs double brackets in shell scripts
Shell Scripting

Bash Single vs Double Brackets: 8 Real Script Examples (Part 16 / 34)

May 23, 2026 May 23, 2026 - by sharon - Leave a Comment

Most programmers write their first Bash if statement using [ ] (or sometimes [[ ]]), run into a space-in-variable bug, spend an hour searching Google for a fix, and eventually hear about [[ ]] as some kind of magic solution without fully understanding how the two actually differ. I was one of those people. I […]

Read More
bash quoting rules in shell scripts
Shell Scripting

5 Bash Quoting Rules for Cleaner Scripts (Part 15 / 34)

May 22, 2026 May 22, 2026 - by sharon - Leave a Comment

You’ve got all of your variables defined, your script appears correct, and then when you run echo '$APP_DIR', the terminal spits back a dollar sign instead of the actual directory path. You are now sitting in front of the terminal wondering, “What just happened?” I wrote echo '$APP_DIR' using single quotes and could not understand […]

Read More
bash variables types explained with examples
Shell Scripting

Bash Variables and Default Values Made Easy (Part 14 of 34)

May 20, 2026 May 20, 2026 - by sharon - Leave a Comment

11 Bash Variables and Default Values Made Easy | LinuxTeck Learning bash variables types explained with examples is the foundation every Linux scripter needs before writing anything serious. The first bash script I attempted to run produced an error that made absolutely no sense to me. It turned out I had written name = "LinuxTeck" […]

Read More
bash conditional statements examples in Linux
Shell Scripting

Bash Decision Scripts Made Simple (Part 13 / 34)

May 14, 2026 May 14, 2026 - by sharon - Leave a Comment

Bash Decision Scripts Made Simple: 11 Real-World Examples | LinuxTeck While writing a Bash script with a simple sequential list of commands has some utility, this type of scripting is very limiting. A script truly comes into its own when it can make decisions automatically based on conditions or command results. Bash conditional statements allow […]

Read More
bash case statement with examples
Shell Scripting

Shell Script Case Statements Made Simple Part 12 / 34)

May 13, 2026 May 13, 2026 - by sharon - Leave a Comment

Bash Case Statement with Examples — Shell Script Case Statements Made Simple | LinuxTeck You may be familiar with the challenge of having to use multiple if, elif, and else, blocks when checking for many different cases in one shell script. The bash case statement with examples provides a much simpler and easier-to-read method to […]

Read More
bash if statement complete guide with examples
Shell Scripting

Using test and Conditional Expressions (Part 11 / 34)

May 10, 2026 May 10, 2026 - by sharon - Leave a Comment

Bash if Statement: Complete Guide with Examples | LinuxTeck If you have ever wanted your Linux scripts to make decisions on their own, you are in the right place. The bash if statement is a fundamental building block that allows shell scripts to test conditions and decide what action to take next. This bash if […]

Read More

Posts navigation

1 2 Next

Trending

  • Steps to Install Centos-8 with screenshots
  • Linux Remote Access Command Cheat Sheet
  • "Linux Is Safe" Lie That's Getting Servers Hacked in 2026
  • How to List Hardware Devices in Linux (lspci and lsusb)
  • Bash Variables and Default Values Made Easy (Part 14 of 34)
  • How to Install LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL /CENTOS 7.6 - LinuxTeck
  • How to set up MariaDB on Rocky Linux 8
  • Best Linux Certifications in 2026 to Boost Your Career
  • 14 sort Command Examples in Linux - Contents Like a Pro
  • Writing Your First Script (Hello World + Execution + Permissions) - Part 4 of 34
  • Popular
  • Comments
  • Tags
How to Install CentOS 8 with full steps

Steps to Install Centos-8 with screenshots

Jun 24, 2020

Linux Remote Access Command Cheat Sheet

Linux Remote Access Command Cheat Sheet

Apr 10, 2023

IsmaelShell Script Case Statements Made Simple Part 12 / 34)
John BrittoX11 vs Wayland in 2026: The Linux Display Protocol Shift Explained
No tags to show

Google Add as a preferred
source on Google
  • Contact US
  • Privacy Policy
  • Terms of use
Copyright © 2026 LinuxTeck. All Rights Reserved.
Material from our website cannot be republished ONLINE or OFFLINE without our permission.
L