Skip to the content
Skip to content
Top Menu
Jun 15, 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
    • Shell Script
    • Networking
  • Enterprise Linux
Main Menu

Shell Scripting

awk for log analysis linux
Shell Scripting

How Sysadmins Use AWK for Log Analysis (Part 29 / 34)

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

× Most sysadmins reach for awk not because they planned to, but because grep stopped being enough. You have a log file, you need to count something, filter by a field, or pull a number out of structured output. That is exactly what awk for log analysis is built for. This guide is for Linux […]

Read More
bash script apache virtual host creation on Ubuntu
Shell Scripting

Build Apache Virtual Hosts Faster with Bash (Part 28 / 34)

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

× You've got three projects to spin up today, and the first thing you do is open /etc/apache2/sites-available/ and start typing another virtual host config from scratch. Again. If you manage Apache on Ubuntu or Debian-based systems and find yourself creating virtual hosts more than once a week, this is for you. After working through […]

Read More
advanced awk text processing examples in linux
Shell Scripting

Learn Advanced AWK for Text Processing (Part 27 / 34)

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

× You open a 200,000-line log file, and your boss asks you to create a report showing how many failed requests were made from each IP address before the end of the day. Most users will use Python. The ones who actually know what they're doing will use awk and get their answers within 45 […]

Read More
awk command in Linux
Shell Scripting

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

Jun 09, 2026 Jun 10, 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

Posts navigation

1 2 Next

Trending

  • How to Install and configure Master /Slave DNS in Centos /RHEL 7.6 - LinuxTeck
  • How to set up an SFTP server on Rocky Linux 8
  • Best Linux VPS Hosting 2026: Top Picks for US Developers
  • Fedora Asahi Remix 43 Arrives - and It's the Most Complete Apple Silicon Linux Release to Date
  • How to Secure Your Linux Server from Ransomware in 2026
  • Switch from Cron Jobs to systemd Timers
  • 15 basic 'ps' command to monitor Linux process with Examples
  • User Management Command Cheat Sheet
  • The Complete Linux Command Handbook for Beginners - 2026 Edition
  • Unix File System Guide: What Every New Developer Must Know
  • Popular
  • Comments
  • Tags
how to configure master and slave dns server in centos 7

How to Install and configure Master /Slave DNS in Centos /RHEL 7.6 - LinuxTeck

May 03, 2019

SFTP Setup on Rocky Linux 8.5

How to set up an SFTP server on Rocky Linux 8

Feb 04, 2022

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