III B.E. (Information Technology)

VII SEMESTER

7 IT 10 SHELL PROGRAMMING

1        ,2 Write a shell scrip to create a file in / user/ class/ batch directory. Following the instructions:

(i) Input a page profile to yourself, copy it into other existing file;

(ii) Start printing file at line 5;

(iii) Print all difference between tow file, copy the two files into files;

(iv) Print lines matching 3 word pattern, (e.g. name is Mr.);

3        ,4 Write shell scripts for –

(i) Showing the count of users logged in.

(ii) printing 3- column list of files in your home directory.

(iii) Listing your job with below normal priority.

(iv) Continue running your job after logging out.

1        Write a shell script to change data format. Show the time taken in execution of this script.

2        Write a shell script to print file names one per line in a directory showing serial number of the file. (Hint: use for loop).

3        Write a shell script to sort a list of file either in alphabetic order or largest file first, according to user response.

4        Write a shell script to print the name and the time of login sorted by time. (Hint: sue awk).

5        Write a shell script to count the lines, words and characters in it input. (Note Don’s use wc).

6        Write a shell script to print end of a glossary file, in reverse order using array. (Hint: use awk, tail).

7        Modify call command to accept more than one month (e.g. $cal α not).

8        Write a shell script to check whether Ram logged in, count checking every 60 seconds until success.