15 lines
933 B
Markdown

## Answers for Lab 3 - OS
1. `q1.sh` - `File or Folder check` -Using `echo` and `if-elseif-fi` statements.
2. `q2.sh` - `Filename Search` - Using `find` args, primarily `iname` for pattern matching and `-type>
3. `q3.sh` - `Extension Change` - `.txt` -> `.txt`. Mainly using `mv`, but `cut` was used with a deli>
4. `q4.sh` - `Arithmetic in echo` - `bc -l` is used for mathlib for arithmetic arg printed by `echo`.
5. `q5.sh` - `Directory with Custom Files` - application of basic `mkdir`, `cp`, `find` commands
6. `q6.sh` - `Start of the line mod` - `sed` args stacked to meet query requirements.
7. `q7.sh` - `Even Number Line deletion` - Uses `read` to parse through a file, and an iterating vari>
### Additional Exercises
1. `addq1.sh` - `Prime Number Checker` - `if-else` and `for` loops.
2. `addq2.sh` - `Factorial` - `for` loop almost exclusively.
3. `addq3.sh` - `EvenFile vs Oddfile` - `read`, `if-else` and `while` loops