Bash scripting for display Employee List in UNIX LINUX shell scripting


In this script it gets the employee details as the input. Employee list scripting take input as allowance,deduction,basic we are storing these variable in $all, $ded,$basic,, by using the Linux and UNIX bash scripting we can calculate gross and net. CS1252 Operating Systems lap
Source code bash shell Programming Algorithm
echo “ Enter code, allowance, deduction, basic pay ”
read code
read all
read ded

read basic
echo “ The code is $code ”
echo “ The allowance is $all ”
echo “ The deduction is $ded ”
echo “ The basic pay is $basic ”
get $code $all $ded $basic
gross=`expr $bacis + $all`
net=`expr $gross - $ded`
echo “ The gross is $gross ”
echo “ The net is $net ”
OUTPUT CS1252 Operating Systems lap display Employee List
[redhat35@localhost Rhel5]$sh
Enter code, allowance, deduction, basic pay
The gross is 600
The net is 300

No comments:
Write comments