Linux Scripts :
How to write shell script that will add two nos, which are supplied as command line argument, and if this two nos are not given show error and its usage
Write Script to find out biggest number from given three nos. Nos are supplies as command line argument. Print error if sufficient arguments are not supplied.
Write script to print nos as 5,4,3,2,1 using while loop
Write Script, using case statement to perform basic math operation as
The name of script must be ‘q4’ which works as follows
$ ./q4 20 / 3, Also check for sufficient command line arguments
Write Script to see current date, time, username, and current directory
Write script to print given number in reverse order, for eg. If no is 123 it must print as 321
Write script to print given numbers sum of all digit, For eg. If no is 123 it’s sum of all digit will be 1+2+3 = 6.
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 script to print contains of file from given line number to next given number of lines. For e.g. If we called this script as Q13 and run as
$ Q13 5 5 myf , Here print contains of ‘myf’ file from line number 5 to next 5 line of that file.
Write script called say Hello, put this script into your startup file called .bash_profile, the script should run as soon as you logon to system, and it print any one of the following message in infobox using dialog utility, if installed in your system, If dialog utility is not installed then use echo statement to print message : –
Good Evening , according to system time.
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 computer cpu information like processor type, speed etc
Show memory information
File system (Mounted)
Write a shell script to print the given number id palindrome?
Write a shell script to check diskspace/mountpoint limit ?
Write a shell script to check analyzed objects?
Write a shell script to analyze schema?
Write a shell script to print recently generated generated in alter log?
Write a shell script for checking status of databases in a server?
Hint : if db is open print open , if Db is in mount print mount, if db is nomount print nomount.
Write a shell script to find 70% threshold in filesystem.