0% found this document useful (0 votes)
60 views1 page

RD TH

This document contains questions about shell scripting and awk programming in UNIX/Linux. It asks to write shell scripts that copy files with user confirmation, copy files in pairs, and check for users without passwords. It also asks to write awk programs that print odd lines, delete blanks, filter by line length, and print the last field. Finally, it asks how the kernel maintains consistency of data structures.

Uploaded by

Bhupesh Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views1 page

RD TH

This document contains questions about shell scripting and awk programming in UNIX/Linux. It asks to write shell scripts that copy files with user confirmation, copy files in pairs, and check for users without passwords. It also asks to write awk programs that print odd lines, delete blanks, filter by line length, and print the last field. Finally, it asks how the kernel maintains consistency of data structures.

Uploaded by

Bhupesh Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

UNIX

Q 1. Write a shell script that counts total no of lines n each file supplied as argument to set. Q2 wa shell script that accepts two file names as arguments and copies the content of source file to the destination file. if the destination file already exists, it will ask the user if the ans is yes , proceed with copy otherwise not. Q3. WA shell script that receives even no of file names or aurgument. Suppose 4 file names are supplied then the first file should get copied into second file the 3rd file should get copied into 4th file and so on. If an odd no of file names is supplied then no copying should takes place and an error msg should be displayed Q4 Write an awk program for the following i) ii) iii) iv) Print only the odd no bearded lines of a file Delete all blank line including those that contains white space ) from a file Locate lines longer than 100 and smaller than 150 char Print the last field without knowing the no of fields in a lines

Q5) WA shell script that uses awk to find user who have no passwords the user details and encrypted password are stored Q6) how does the kernel maintains consistency of this data structure explain with appropriate illustration

You might also like