From 277bd63efad01297afc142f1b015d34a859a0531 Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Tue, 14 Jan 2025 15:13:53 +0530 Subject: [PATCH] Update OS/bash/Week2/answers.md --- OS/bash/Week2/answers.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OS/bash/Week2/answers.md b/OS/bash/Week2/answers.md index d2d028a..7ffcf72 100644 --- a/OS/bash/Week2/answers.md +++ b/OS/bash/Week2/answers.md @@ -7,6 +7,7 @@ Q2. - `grep ' ' *` - `grep '[0-9]' filename > outputfile` + Q3. - `grep -c "ICT" ITStudents.txt` - `sed 's/:IT:/:Information Technology:/g' students.txt > ITStudents.txt` - `sed awk -F: '$1 == "1234" { avg = ($6 + $7 + $8) / 3; print avg }' students.txt` @@ -15,7 +16,9 @@ Q3. - `grep -c "ICT" ITStudents.txt` Q4. - `grep -rl "MIT" . | xargs sed -i 's/MIT/Manipal Institute of Technology/g'` + Q5. - `find . -type f -name '*[0-9]*' -exec wc {} +` + Q6. - `for i in {1..5}; do wc example.txt & done` - `pkill wc`