Skip to content

CodeTyperPro/lessons-shell-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LINUX SHELL TASK

Create a shell script named lessons.sh which processes over a text file (file name is given in the command line - argument) and answers the following questions! In the text file, the teachers' timetables are recorded. The teacher names are listed line by line, and his/her lessons per day, separated by commas. See the example:

Jakab Gipsz, M 1 3 4 5, Tu 1 2 3, W, Th 3 4 5 6 7, F 1 2 3 4

  1. Enter the teacher(s) who does not have a lesson on Wednesday - if all have a lesson, write "NONE". e.g. "NONE".
  2. Give the number of lessons per teacher.
  3. Read in a day and give who does not have the first lesson on that day.

Instructions

Run the following command in the linux terminal line:

chmod u+x lessons.sh

./lessons.sh file_schedules_1.dat

OR

./lessons.sh file_schedules_2.dat

Made by MARTINS Alfredo.