📘 PAPER 5 – OPERATING SYSTEM (UNIT 5 – SHELL PROGRAMMING & FILTER COMMANDS) university of allahabad
🔴 UNIT 5 – SHELL PROGRAMMING & FILTER COMMANDS 🟢 1. Introduction to Shell ✅ What is a Shell? A Shell is a command-line interpreter that: Accepts user commands Executes them Acts as an interface between user and OS 🔹 Types of Shells in Linux Shell Description sh Bourne shell bash Bourne Again Shell (most used) csh C shell ksh Korn shell zsh Advanced shell 👉 Bash is most commonly used. 🟢 2. Shell Programming ✅ Definition Shell programming is writing a script to automate tasks using shell commands. 🔹 Advantages ✔ Saves time ✔ Automates tasks ✔ Easy to write ✔ Used in system administration 🟢 3. Structure of Shell Script #!/bin/bash echo "Hello World" Explanation: #!/bin/bash → Shebang line echo → Print output 🔹 Running a Shell Script chmod +x file.sh ./file.sh 🟢 4. Variables in Shell User Defined Variable name= "Amit" echo $name System Variables $HOME $USER $PATH 🟢 5. Read Command echo ...