CSE424 / OS Lab

Syllabus

Experiments

EXPT1: File Permission

Write a shell Script to assign a file permission to the given file using Symbolic Mode/Absolute Mode:

// Some code
EXPT2: File Compression

To compresses a file using gzip and pack commands

// Some code
EXPT3: Pattern Search using grep & fgrep

To find a given pattern in a list of files of current directory using grep and fgrep commands.:

// Some code
EXPT4: Directory Creation and File Movement

Write a shell script to create two directories and store five files in one directory using the related commands and to transfer all the files to another directory

// Some code
EXPT5: File Existence Check & Information Display

Write a shell script to accept a file name as input and display whether it exits or not. If it exists, then give the details of its attributes like access permission, its size etc.:

// Some code
EXPT6: Sum of Number using Command Line

Shell Script to find out the sum of the given numbers using command line argument.

// Some code
EXPT7: Shell Script to Find Large/Small Number

Write a shell script to find the largest among the 3 given numbers also write a shell script to find the smallest.

// Some code
EXPT8: Shell Script to Find Sum of Digits of Number

Write a shell script to find sum of digits of a number

// Some code
EXPT9: Shell Script to Replicate Head/Tail Commands

Write a shell scripts which works similar to the Unix commands Head Tail.

// Some code
EXPT10: Shell Script for Basic Math Ops

Write a shell script to find the sum, the average and the product of the four integers entered.

// Some code
EXPT11: User Log in Info

Write a shell script to find how many terminals has this user logged in.

// Some code
EXPT12: Shell Script for Number Reversal

Write a shell script to reverse a number supplied by a user.:

// Some code
EXPT13: Shell Script for Power Finding

Write a script to find the value of one number raised to the power of another.:

// Some code
EXPT14: Shell Script for File Existence Check

Write a shell script, which will receive any number of filenames as arguments. The shell script should check whether such files already exist.

// Some code
EXPT15: File Contents Reversal

Write a shell script to reverse the contents of a file:.

// Some code
EXPT16: Count No of entries in subdirectory at path

Write a script to count and report the number of entries in each subdirectory mentioned in the path, which is supplied as a command-line argument.

// Some code
EXPT17: Shell Script for Basic Math Ops using cmd line args

Write a shell program to add, subtract and multiply the 2 given numbers passed as command line arguments:

// Some code
EXPT18: Menu Driven Shell Script

Write a menu driven shell script for Copy a file, remove a file, Move a file.

// Some code
Get Credited for sharing your Knowledge Source with your Peers
Submit Queries/Feedbacks/Suggestions/Complaints using this Form

Last updated

Was this helpful?