How to write shell script that will add two numbers, which are supplied as command line argument, and if this two numbers are not given
show error and its usage
Write Script to find out biggest number from given three numbers. numbers are supplied as command line argument. Print error if sufficient
arguments are not supplied.
How to calculate 5.12 + 2.5 real number calculation at prompt in Shell ?
Answer: Use command as , echo 5.12 + 2.5 bc , here we are giving echo commands output to bc to calculate the 5.12 + 2.5.
How to perform real number calculation in shell script and store result to third variable , lets say a=5.66, b=8.67, c=a+b?
Write script to print numbers as 5,4,3,2,1 using while loop.
Write script to determine whether given file exist or not, file name is supplied as command line argument, also check for sufficient number of command line argument
Write shell script to show various system configuration like
Currently logged user and his logname
Your current shell
Your home directory
Your operating system type
Your current path setting
Your current working directory
Show Currently logged number of users
About your os and version ,release number , kernel version
Show all available shells
Show mouse settings
Show computer cpu information like processor type, speed etc
Show memory information
Show hard disk information like size of hard-disk, cache memory, model etc
File system (Mounted)
Implement as many as possible.
Write script to implement getopts statement, your script should understand following command line argument called this script
script -c -d -m -e
Where options work as
-c clear the screen
-d show list of files in current working directory
-m start mc (midnight commander shell) , if installed
-e { editor } start this { editor } if installed