A menu driven shell script for Copy a file, Remove a file, Move a file
clear echo "Menu " echo "1. Copy a File " echo "2. Remove a file " echo "3. Move a file" echo "4. Quit" echo "Enter ur Choice c" read…
q
clear echo "Menu " echo "1. Copy a File " echo "2. Remove a file " echo "3. Move a file" echo "4. Quit" echo "Enter ur Choice c" read…
#!binsh echo "options are :n+:addn-:substractn*:multiplyn/:divide " echo "enter the 2 nos " read a read b echo "nenter your choice " read ch case $ch in '+') y=`expr $a +…
#!binshecho "enter the string"read stringif [ -z "$string" ]thenecho "null string"elsez=`expr "$string" : '.*'`echo "string length is $z"fiif [ $z -ge 6 ]thenecho "first 3 characters"z=`expr "$string" : '(...).*'`echo "$z"echo…
display_perm() { r=`ls -l $1 | cut -c 2` w=`ls -l $1 | cut -c 3` x=`ls -l $1 | cut -c 4` echo "owner permissions" if [ "$r" =…
A shell program to search a pattern in a file that will take both pattern and file name from the command line arguments. Write a second shell program to read the pattern…
The factorial of a number n is defined by the product of all the digits from 1 to n (including 1 and n). Here we write program, how to print…
#!/bin/sh echo "Enter the year" read year x=`expr $year % 400` y=`expr $year % 100` z=`expr $year % 4` if [ $x -eq 0 ] || [ $y -ne 0…
Here m and n are supplied as command line argument or read from key board interactively.#!/bin/sh echo "Enter the divident" read n echo "Enter the divisor" read m y=`expr $n %…
#!/bin/sh echo "plz enter the three numbers" read x read y read z if [ $x -ge $y ] && [ $x -ge $z ] then echo "$x is the…
What is the game of Tower of Hanoi?Tower of Hanoi consists of three pegs or towers with n disks placed one over the other. The objective of the puzzle is to move…