Com Grap File
Com Grap File
ON
Computer Graphics lab
BCA 5 Sem
th
2.
3. Write a script which takes text files as command-line argument and converts all the
uppercase letters to lowercase, and then stores the results in a file of the same name but
with a “low” extension.
4. Assume you have a file of student’s result with name “mark.text” having information in
sequence as Name, Roll No., Subject1, subject2, subject3 and total marks i.e. total 6
columns. Write a gawk script to store Name and total marks in another file with name
“result”.
5. Write a shell script using ‘Case’ statement. Which offers following choices to the user
a. display file contents
b. count the no. of lines
c. converts the contents into capital letters
d. exit
According to the user’s choice, ask the file name and performs the desired action.
6. Take the input from the user & report whether it is file or a directory or something
else.
7. Write a script which reads your name, surname & year of birth as command line
arguments and gives the output like.
My name is : ………………
My Surname is : ………………
My YOD is : ………………
8. Write a script that takes a no. ‘n’ & a word as command line input. Then it prints the
word ‘n’ times.