Unix179 Vasu
Unix179 Vasu
Index
Sr. Description Page no Date Sign
No.
1 Write a command using grep or sed or awk to replace
2
all occurrences of 'she' with 'he' and 'hi' with 'hello'.
2 Write a command using grep or sed or awk to locate 2
lines that begin and end with. (dot)
3 Write a command using grep or sed or awk to display 2
lines 5 to 15, 25 to 35 and the last line of file f1.
4 Write a command to count the number of characters 3
in the first five lines of file x1.
5 Write a shell script to check whether the given string 3
is palindrome or not.
6 Write a shell script to accept a string and reverse it 4
without using rev () function, apply proper validation
7 Write a shell script to find a file with maximum size in 4
the current directory, also print the no of words,
characters, and lines along with the content of file.
8 Write awk command to print odd number of words in 5
each line.
9 Write a command using grep or sed or awk to display 6
all lines that contains 'ab*' in a line.
10 Write a command using grep or sed or awk to locate 6
lines where first and last characters of file fl are same.
11 Write a command using grep or sed or awk to replace 6
'hello' with 'Good Morning' in input file 'al.sh' and write
those lines to output file a2.sh.
12 Write a shell program that accept five numbers and 7
display second highest number from the entered
numbers.
13 Write a shell script which can be utilized as a 7
calculator. The values can be entered using
command line arguments
14 To display line 15 to 25 from file f1. 8
15 To remove directory tree fold1/fold2/fold3 using single 8
command.
16 To move all the files that begins with the digit from the 8
parent directory to current directory.
17 To convert decimal 192 to hexadecimal 8
VASU_179 1
UNIX & SHELL PROGRAMMING
(2) Write a command using grep or sed or awk to locate lines that begin
and end with. (dot)
(3) Write a command using grep or sed or awk to display lines 5 to 15,
25 to 35 and the last line of file f1.
VASU_179 2
UNIX & SHELL PROGRAMMING
(4) Write a command to count the number of characters in the first five
lines of file x1.
(5) Write a shell script to check whether the given string is palindrome or
not.
VASU_179 3
UNIX & SHELL PROGRAMMING
(6) Write a shell script to accept a string and reverse it without using rev
() function, apply proper validation.
(7) Write a shell script to find a file with maximum size in the current
directory, also print the no of words, characters, and lines along with the
content of file.
VASU_179 4
UNIX & SHELL PROGRAMMING
(8) Write awk command to print odd number of words in each line
VASU_179 5
UNIX & SHELL PROGRAMMING
(9) Write a command using grep or sed or awk to display all lines that
contains 'ab*' in a line.
(10) Write a command using grep or sed or awk to locate lines where
first and last characters of file fl are same.
(11) Write a command using grep or sed or awk to replace 'hello' with
'Good Morning' in input file 'al.sh' and write those lines to output file
a2.sh
VASU_179 6
UNIX & SHELL PROGRAMMING
(12) Write a shell program that accept five numbers and display second
highest number from the entered numbers.
(13) Write a shell script which can be utilized as a calculator. The values
can be entered using command line arguments.
VASU_179 7
UNIX & SHELL PROGRAMMING
(16) To move all the files that begins with the digit from the parent
directory to current directory.
VASU_179 8
UNIX & SHELL PROGRAMMING
VASU_179 9