SC Oppe May24
SC Oppe May24
File: /opt/se2001/oppe1.1_problem_2/README.md
───────┼────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
───────────────────────
In a course, the instructor asked the students to submit their projects in a single file named as
the student’s roll number. A typical roll number of a student is a 10 character string which is
a combination of a four digit(decimal) year and six character hexadecimal number, e.g.
"`20201f3acd"`. The instructor specified that the name of the file should be in lower case but
some students mistakenly used uppercase for their file names. Each file name is either entirely
in lower case or entirely in upper case with numbers.
Your task is to create script `array.sh` which will have two arrays(shell variables)
named `lower` and `upper`. Array `lower` should not contain the file names that have upper
case letters and
│ array `upper` should contain all the file names that have upper case letters.
4 │
5 │ Note: The project file names are provides as standard input
6 │
7 │ **Sample Input**:
8 │ ```
9 │ 20201f3acd
10 │ 2020ABCD12
11 │ 2021a1b2c3
12 │ 2021999999
13 │ 2020EF12AB
14 │ ```
15 │
16 │ **Sample Output**:
17 │ ```
18 │ 20201f3acd
19 │ 2021a1b2c3
20 │ 2021999999
21 │ 2020ABCD12
22 │ 2020EF12AB
23 │ ```
File: /opt/se2001/oppe1.1_problem_3/README.md
───────┼────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
───────────────────────
1 │ A CSV file `student_data.csv` contains student information with columns
StudentID,Name,Age,Grade. Write a bash script `script.sh` that prints all the lines where only
one part i.e. first name or
│ last name is present but not both.
2 │
3 │ Note:
4 │ - Assume that the `student_data.csv` is present in the current working directory and is
given to the script through standard input.
5 │ e.g. `cat student_data.csv|./script.sh`
6 │ - The first name and last name as separated by a space
7 │
8 │ **Sample input**
9 │
10 │ ```
11 │ StudentID,Name,Age,Grade
12 │ 101,John Doe,20,A
13 │ abc123,Jane Smith,22,B
14 │ 104,Mike,23,C
15 │ 105,,19,D
16 │ ```
17 │
18 │ **Sample output**
19 │
20 │ ```
21 │ 104,Mike,23,C
22 │ ```
File: /opt/se2001/oppe1.1_problem_4/README.md
───────┼────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────
───────────────────────
1 │ You have a text file named `input.txt` that contains multiple lines of text. Write a `SED`
script named `format_text.sed` that performs the following operations:
2 │
3 │ - Adds two new line characters after each sentence ending with a full stop.
4 │
5 │ Note that the input is provided to the script through standard input. Ex: `cat input.txt | sed
-f format_text.sed`
6 │
7 │
8 │ **Sample input**
9 │ ```
10 │ It was seven o’clock of a very warm evening in the Seeonee hills when Father Wolf
woke up from his day’s rest, scratched himself, yawned, and spread out his paws one after the
other to get rid o
│ f the sleepy feeling in their tips. Mother Wolf lay with her big gray nose dropped across
her four tumbling, squealing cubs, and the moon shone into the mouth of the cave where they
all lived. "
│ Augrh!" said Father Wolf. "It is time to hunt again." He was going to spring down hill when
a little shadow with a bushy tail crossed the threshold and whined: "Good luck go with you, O
Chief of
│ the Wolves. And good luck and strong white teeth go with noble children that they may
never forget the hungry in this world."
11 │ ```
12 │
13 │ **Sample output**
14 │ ```
15 │ It was seven o’clock of a very warm evening in the Seeonee hills when Father Wolf
woke up from his day’s rest, scratched himself, yawned, and spread out his paws one after the
other to get rid o
│ f the sleepy feeling in their tips.
16 │
17 │ Mother Wolf lay with her big gray nose dropped across her four tumbling, squealing
cubs, and the moon shone into the mouth of the cave where they all lived.
18 │
19 │ "Augrh!" said Father Wolf.
20 │
21 │ "It is time to hunt again."
22 │
23 │ He was going to spring down hill when a little shadow with a bushy tail crossed the
threshold and whined: "Good luck go with you, O Chief of the Wolves.
24 │
25 │ And good luck and strong white teeth go with noble children that they may never forget
the hungry in this world."