933 B
933 B
Answers for Lab 3 - OS
q1.sh
-File or Folder check
-Usingecho
andif-elseif-fi
statements.q2.sh
-Filename Search
- Usingfind
args, primarilyiname
for pattern matching and `-type>q3.sh
-Extension Change
-.txt
->.txt
. Mainly usingmv
, butcut
was used with a deli>q4.sh
-Arithmetic in echo
-bc -l
is used for mathlib for arithmetic arg printed byecho
.q5.sh
-Directory with Custom Files
- application of basicmkdir
,cp
,find
commandsq6.sh
-Start of the line mod
-sed
args stacked to meet query requirements.q7.sh
-Even Number Line deletion
- Usesread
to parse through a file, and an iterating vari>
Additional Exercises
addq1.sh
-Prime Number Checker
-if-else
andfor
loops.addq2.sh
-Factorial
-for
loop almost exclusively.addq3.sh
-EvenFile vs Oddfile
-read
,if-else
andwhile
loops