Best Uttarakhand Engineering Colleges | Best college

Unix and Shell Programming Lab

Unix shell is a command-line interpreter or shell that provides a traditional Unix-like command line user interface. Users direct the operation of the computer by entering commands as text for a command line interpreter to execute, or by creating text scripts of one or more such commands. Users typically interact with a Unix shell using a terminal emulator, however, direct operation via serial hardware connections, or networking session, are common for server systems. All Unix shells provide filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration.

Sr. No.Name of PracticalsSoftware & Hardware requiredIcon
1Use Vi editor to create a file called myfile.txt which contain some text. Correct typing
errors during creation, Save the file & Logout of the file
2Open the file created in Exp 1, Add, Change, delete & Save the changes
3Use the cat command to create a file containing the following data. Call it mutable use
tabs to separate the fields 1425 ravi 15.65, 4320 ramu 26.27, 6830 sita 36.15, 1450 raju
4Use the cat command to display the file, my table, use vi command to correct any errors
in the file, my table, use the sort command to sort the file my table according to the first field. Call
the sorted file my table(same name) & print the file my table
5Use the cut & paste commands to swap fields 2 and 3 my table. Call it mytable(same
name) & print the new file, my table
6Use the date and who commands in sequence ?(in one line) such that the output of date
will display on the screen and the output of who will be redirected to a file called my
file2.Use the more command to check the contents of myfile2.
7Develop an interactive grep script that asks for a word and a file name and then tells
how many lines contain that word
8Write A shell script that takes a command –line argument and reports on whether it is
directry ,a file,or something else
9Write a shell script that accepts one or more file name as a arguments and converts all of
them to uppercase,provided they exits in the current directory
10Write a shell script that determines the period for which a specified user is working on
the system

Paste your AdWords Remarketing code here