From ade5cdd3c1cd1ba6692409a506b8faa811994871 Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Fri, 31 Jan 2025 09:55:05 +0530 Subject: [PATCH] Update OS/bash/Week4/solutions.md --- OS/bash/Week4/solutions.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OS/bash/Week4/solutions.md b/OS/bash/Week4/solutions.md index df8bc50..537a5dd 100644 --- a/OS/bash/Week4/solutions.md +++ b/OS/bash/Week4/solutions.md @@ -1,10 +1,13 @@ ## Lab 4 ### Lab Exercises + Q1. `q1.sh` - Duplication - `cp` of `$1` arg (first argument). + Q2. `q2.sh` - Deletion - `rm` of all `$@` files using `for` loop. + Q3. `q3.sh` - String Sort - Selection sort using loops and `if` and `echo`. -Q4. `q4.sh` - File TypeCounter - Word/Line/CharCount of file via switch `case` statement and passing various commands. -Q5. `q5.sh` - Pattern Recognition - `grep` for finding the pattern, `sed` for deleting the pattern, and `exit` for killing the pattern. +Q4. `q4.sh` - File TypeCounter - Word/Line/CharCount of file via switch `case` statement and passing various commands. Command: `./q4.sh -wordcount new.txt` +Q5. `q5.sh` - Pattern Recognition - `grep` for finding the pattern, `sed` for deleting the pattern, and `exit` for killing the pattern. Command: `./q5.sh "hello" new.txt`