📜 Shell Scripting

⬅ Linux Hub 🌐 Technology Hub 🏠 Home

📜 Linux Shell Scripting

Automate Tasks Using Shell Scripts

📖 What is Shell Scripting?

Shell Script என்பது Linux Commands-ஐ ஒரு File-ல் எழுதிப் Automation செய்ய பயன்படும் Program ஆகும்.

Shell Script = Automating Linux Tasks

⚙ Simple Script Example

#!/bin/bash

echo "Welcome to VelviHub"

📦 Variables

name="Raj"

echo $name

🔢 User Input

read username

echo $username

🔀 If Statement

if [ $a -gt 10 ]
then
echo "Greater"
fi

🔄 For Loop

for i in 1 2 3 4 5
do
echo $i
done

♻ While Loop

count=1

while [ $count -le 5 ]
do
echo $count
count=$((count+1))
done

📂 File Check Script

if [ -f file.txt ]
then
echo "File Exists"
fi

🌐 Network Monitoring Script

ping -c 4 8.8.8.8

🛠 Backup Script

tar -cvf backup.tar /home

🌍 Real World Usage

✔ Server Automation

✔ Daily Backups

✔ Network Monitoring

✔ Telecom Operations

✔ Cloud Administration

✔ DevOps Automation

🎤 Interview Questions

What is Shell Scripting?

What is Bash?

How to create variables?

What is a Loop?

Difference between For and While?

How to automate tasks?

What is Shebang (#!/bin/bash)?

How to run a Shell Script?

📝 Summary

Shell Scripting என்பது Linux Administration மற்றும் DevOps-ல் மிகவும் முக்கியமான Automation Skill ஆகும்.

🚀 Next Lesson

🖥 Linux Server →