0% found this document useful (0 votes)
9 views

Shell Scripting Questions

Uploaded by

bhargavialluri30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Shell Scripting Questions

Uploaded by

bhargavialluri30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Explain following commands with example

i) who ii) ls iii) date iv) time v) cat


Explain following commands with example
i) cat ii) cp iii)pwd iv) mv v) ps
Explain following commands with example
i) mkdir ii) cd iii)touch iv) rm v) rmdir
Explain following commands with example
i) cat ii) sort iii)head iv)tail v) vi
Explain following commands with example

Q1. i) wc ii) grep iii) chmod iv) echo v) cal


Explain following commands with example
i) ls ii)ps iii)who iv)man v)cat
Explain following commands with example
i) cat ii)cp iii)mv iv)pwd v)vi
Explain following commands with example
i) grep ii) echo iii)date iv) cal v) wc
Explain following commands with example
i)mkdir ii)cd iii)cat iv) rm v) rmdir
Explain following commands with example
i) cat ii) sort iii) head iv)tail v)wc
1. Write a Shell Script to check the given number is Armstrong or not
2. Explain awk command and print the students list who are studying “CSE”
3. Define & Explain Array with suitable example
4. Write a shell script to find biggest number of 3-Numbers
5. Write a Shell Script to print nth mathematical table using while
6. Write a Shell Script read 5-subjects marks of a student then perform following constraints
i) check it the student is pass or fail
ii) if student pass then calculate total & percentage
iii) Based on Percentage display the result given below
 if percentage >=80 display “Distinction”

Q2  if percentage >=70 display “Above first Class”


 if percentage >=60 display “First Class”
 if percentage >=50 display “Second Class”
 if percentage >=40 display “Just Pass”
7. write a shell script to demonstrate passing of arguments
8. Explain awk and print the square of the Numbers from 1 to 9
9. Explain awk and print specified column data of a file.
10. Write a Shell Script to print odd numbers from 1 to n
11. Define awk & explain Built in variables NR & NF in awk
12. write a Shell Script to find factorial of a given number using do while loop
13. Define & Explain Array with suitable example
14. Write a Shell Script to check whether the given number is EVEN or ODD
1. Write a shell script to create a file and Start printing file at certain line
2. Write a shell script to perform all Arithmetic operations using “case” Control structure
3. Write a shell script to change data format. Show the time taken in execution of
this script
4. Write a shell script to create a file and Print lines matching certain word pattern
5. Write a Shell Script to access all the elements in an Array.
Q3 6. Write a shell script to count lines, words and characters in its input (do not use wc)
7. Write a shell script to create a file and Input a page profile to yourself, copy it into other
existing file
8. Write a Shell Script to create a file & Start printing file at certain line
9. Write a shell script to print files names in a directory showing date of creation
10. write a shell script to create two files and Print all the difference between two file, copy
the two files into the directory

You might also like