4th Semester - Codes for UNIX shell programming @ JMI, New Delhi
-
WASS to implement a function mycd() using which you would be able to shuttle between directories. This function should work in the following manner: $mycd dir -> cd to directory dir $mycd - ->cd to previous directory
-
WASS to implement 'wc' command without using the wc. The script can recieve the option l w c to indicate whether no. of lines/word/char from the user i/p are to be counted. The user may use all or any of the option. If wrong option return INVALID option.
-
WASS to implement a simple Calculator(+,-,/,%,*) to demonstrate the concept of Functions in Shell script.
-
WASS to add two numbers.
-
WASS to output area and perimeter of a circle.
-
WASS to accept two nos and print the largest of them.
-
WASS to take two file names, check permission on both the files. If available copy contents of file 1 into file 2 else display error message.
-
WASS to take a file name. Check its permission. If available append your name to the end of it.
-
WASS to accept file name as input. If the i/p name is a file, add some data to the file, else if it is a directory create a file in that directory and add data to the file.
-
WASS to convert Decimal to Binary, Octal & HexaDecimal using control statement.
-
WASS to convert a given number from an user entered base to user entered another base.
-
WASS to check for login status of username as i/p for 5 Minutes after an interval of 1 minute each.*******
-
WASS to check whether the input year is a leap year or not.
-
WASS to Calculate the factorial of a given number.
-
WASS to Calculate sum of all digits of a number using while loop.
-
WASS to check whether i/p number is a palindrome or not.
-
WASS to accept a file name as input and delete all lines containing the word linux in it.
-
WASS to change all the .c files to .cpp .
-
WASS to identify all the 0 byte file in the current directory and delete them. The script should ask the user to before proceeding with the delete.
-
WASS to implement a Calculator to demonstrate use of switch case in Shell scripting.
-
WASS to convert Decimal to Binary without using ibase or obase.
-
WASS to enter no. of filenames. If even no. entered, then copy contents of odd no. files into even no. files. Else display invalid i/p.
-
WASS to cut n lines from a position m without using head and tail commands and show the cut lines as o/p.
-
WASS that reports name and size of all files in a directory whose size is greater than 1000 bytes.
-
WASS to print all prime nos. from n to m.
-
WASS to recieve two filenames as input. It should check whether the file contents of the two files are same or not. If same, delete the second file.
Reference : WASS => Write a Shell Script.