How To Exam?

a knowledge trading engine...


Veer Narmad South Gujarat University 2011-5th Sem B.C.A Computer Application SB-1502 Unix & Shell Programming - 502 Third Year ( ) - Question Paper

Friday, 26 April 2013 06:05Web



Third Year B. C. A. (Sem. V) Examination

March / April - 2011

Paper - 502 : Unix & Shell Programming

SB-1502

Time : 3 Hours]

Instructions :

[Total Marks : 70


(1)

Seat No.:


M    CnsLLnlcj.L{l [qoicu    u? snqw <h>h41.

Fillup strictly the details of signs on your answer book.

Name of the Examination :

T. Y. B. C. A. (Sem. 5)

Name of the Subject:

Paper - 502 : Unix & Shell Programming

-Subject Code No.:

1

5

0

2

-Section No. (1,2,.....): Nil

(2)    Figures on the right indicate marks.

Student's Signature


(3)    Take assumption whenever necessary.

1    Answer the following questions : (any fourteen)    14

(i)    What is shell ?

(ii)    Explain fork ( ) system call.

(iii)    What are the process states in Unix ?

(iv)    What is difference between cmp and VIiff command ?

(v)    What is difference between cat and more command ?

(vi)    What will the $echo* command do ?

(vii)    State the purpose of -n option with sed.

(viii)    Explain the purpose of sticky bit.

(ix)    Which command is used to update time of a file ?

(x)    List the function of Kernal.

(xi)    Explain the significance of tee command.

(xii)    What is difference between grep and fgrep command ?

(xiii)    What does/etc directory contain ?

(xiv)    What is the difference between cat test and cat > test ?

(xv)    What is the purpose of . and .. ?

(xvi)    What is the use of chmod command ?

2    (a) How can you use egrep and fgrep to take pattern 5

from a file ? Give an example of each.

(c)    Explain mail command.    4

OR

(a)    What is regular expression ? Explain any one utility which use regular expression, with proper example.

(b)    Define a shell. Explain meta character that shell use to match file names.

(c)    Explain vi editor in brief.

3 (a) Write a script to check whether an entered number 4 is palindrome or not.

(b)    Write a script to check entered two strings are equal 4 or different, also check the length of both strings are greater than 0.

(c)    Explain sort command with its options. Give example 4 of each.

(d)    Explain pipe. Give example.    2

OR

3 (a) Answer the following : (any seven)    14

(i)    Explain nice.

(ii)    What is significance of sleep and wait command.

(iii)    Explain purpose of /bin directory.

(iv)    Explain cut and paste command.

(v)    Explain tr command with example.

(vi)    Give suitable example for while loop.

(vii)    List editing command for vi editor.

(viii)    What do you mean by internal and external command in Unix ?

(ix)    What is super block consist of ?

4 (a) Write a command for the following : (any eight)    8

(i)    To display total number of words and lines of files for which file name starts with m.

(ii)    To remove all leading space from a file fl.

(iii)    To display line number before each line.

(iv)    To display line 10 to 20 from file fl.

(v)    To remove directory tree dirl/dir2/dir3 using single command.

(vi)    To move all files begin with digit from the parent directory to the current directory.

(vii)    To convert decimal number 192 to hexadecimal.

(viii)    To give read and write permission to file fl.

(ix)    To change modification time of a file fl to Dec. 01 10:30 am

(x)    To display all unique words of file fl.

(i) Which attribute change, when you copy a file from another user account ?

(ii)    Which process creates getty process ? What is the responsibility of getty process ?

(iii)    List disadvantages of vi editor.

(iv)    Why file command is used ?

(v)    Why test command is used ?

(vi)    What is output of tail -20 file 1 ?

(vii)    What is significance of fsck utility ?

(viii)    Write a command to display all words in file 1 that begin with digit.

5 (a) Answer the following questions : (any three)    6

(i)    Explain matching operators of awk utility with example.

(ii)    Explain delete and write operator of sed.

(iii)    Explain concept of array in awk.

(iv)    Explain remembered pattern of sed.

OR

(a)    Write a script using awk utility to create two 3*3    6 matrix and multiply it.

(b)    Answer the following :

(i)    To count number of occurrence of pattern bca in file fl.

(ii)    To print words whose length is greater than

4 characters and consist digit only.

(iii)    To print even number of words in each line.

(2)    Write a command using grep or sed or awk :    4 (any four)

(i)    To display all lines that contains pattern be* in a line.

(ii)    To locate lines where second and second last character of file fl are same.

(iii)    To replace tybca with TYBCA in inputfile in.sh and write those lines to output file out.sh.

(iv)    To replace all occurrence of she with he and hi with hello.

(v)    To locate lines that begin and end with. (dot).

(vi)    To display line 5 to 15, 25 to 35 and last line of file fl.

SB-1502]    3    [ 400 ]







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Veer Narmad South Gujarat University 2011-5th Sem B.C.A Computer Application SB-1502 Unix & Shell Programming - 502 Third Year ( ) - Question Paper