Sie sind auf Seite 1von 1
-w[ TLL Teh acsse Third Semester B.E. Degree Examination, Dec. 07 / Jan. 08 UNIX and Shell Programming ‘Time: 3 hs, Max. Marks:100 Note : Answer any FIVE full questions. 1a Explain UNIX architecture and its salient features. Distinguish between INTERNAL and EXTERNAL commands. (08 Marks) ». Explain with example different types of files supported in UNIX. (5 Marks) ©. What is the output ofthe following commands: echo SPATH ii) Is-lAwe-1 ii) type mksie: mkdir new; iv) who> userlist (oo Marks) 4. Explain man command with its option (@3 Marks) 2 a, Explain briefly the file atribute listed using Is—1 command. (05 Marks) bb. Explain with suitable example how and who can change file permissions (05 Marks) ©. Explain diferent modes in vi editor and list commands in each mode. (0s Marks) 4 How todo the following using vi editor: ) Combine 5 lines into single line ii) Move the cursor {o last line ina file i) Replace has with have in the current ine iv) Adal /* at te beginning of the line and */ atthe end ofthe Tine (04 Maris) 3. a. Explain the mechanism of a process creation and role of system calls (0S Maris) b. Explain the following commands with suitable example and list its options: i) psi) kill, (Os Barks Define job. How isjob control done in UNIX? Explain with exemple. (os Marks) 4. What are environment variables that conteol UNIX system? Explain any theee such variables (05 Marks) 4a. Explain with example find command and its options. {06 Marks) 1b. Write a note on sort command, Discuss its options with example. (os marks) ¢. Explain the following commands: i) umask 022, its effect on fies and direetions i) find /-name aout -o-name care Pritt if) head resultstxt| tail +5 iv) tr 8 °R" directories ii) grep -v “USA” rows.txt| we 1 ii)” sed ‘10,8 sloop! loop with in lope’ moreloaps ‘rep SSHELLS® fecipasswd |eutd“:"-F1 y) grepabe> fbundtxt (10 Mani) What is sed? Explain with example line addressing and context addressing in sed. (04 Maris) 6 a What is shell programming? Write a shell script to create « menu which displays the list of Files, current users, contents of @ particular file and process status ofthe system based on the user choice. (07 Marks) b._ Explain the expr command applicable to numeric and string funetio (05 Marks) ©. Explain the following with reference to shell programmingsi) §? i) west” ii) shift iv) trap (OA Marks) 4, Write a shell sexipt to display fist of all process running in the system every 30 seconds for five times using a i) while loop i) for loop. (oo Marks) 7. Writea note on awk. Explain built-in variables, (06 Marts) 'b. Weite an awk sequence to find the DA, HIRA and gross pay of employees, DA st 50% of basic, HRA at 25% of basie and the gross pay is sum of basi pay, DA and HRA, tlso compute the average 87058 pay. (08 Marks) ‘e. Explain with example the following built in functions i)split() iiysubstr() ii) length() iv) index« ) (06 Marks) 8 a. Explain the following in perl i) $_ default variable i) foreach loop construct it) join) “6 Marks) bb. Write a PERL program that accepts decimal number as arguments and conver it into binary ‘number. (07 Marks) ‘e. Using command line arguments, write a Perl program tofind whether a given yea is leap year (07 Marks)