![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what is $$ S$ $# in shell scripting | PrasannaKS | Shell Programming and Scripting | 2 | 01-14-2009 10:47 PM |
| Shell scripting - FTP | ddk2oo5 | Shell Programming and Scripting | 1 | 01-05-2009 05:11 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 08:12 AM |
| Help on SED AWK in shell scripting | kaushys | Shell Programming and Scripting | 3 | 03-09-2006 02:40 PM |
| shell scripting | girish_shukla | SUN Solaris | 1 | 01-02-2004 12:51 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
shell scripting
Hi
I am studying shell scripting and running below script on RH Ent 3 Linux, however it is giving error. I have written script in Vi editor. Programme condition : If employe's basic salary is less then Rs. 1500, then HRA = 10% of basic salary and DA=90% of basic salary. If his salary is either equal to or above Rs.1500, then HRA=Rs. 500 and DA =98% of basic salary. Write a program to find gross salary. Script: # Calculate the gross salary of employee echo Enter basic salary \? read bs if $bs -lt 1500 then hra='echo $bs \* 10/100 | bc' da='echo $bs \* 90/100 | bc' else hra=500 da='echo $bs \* 98/100 | bc' fi gross='echo $bs + $hra + $da | bc' echo gross salary is $gross Error: ./salary: line 5: 1000: command not found gross salary is echo $bs + $hra + $da | bc i have tried different command at line number 5. like if [$bs -lt 1500] if $bs < 1500 if [$bs -lt 1500] Please suggest. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|