Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

SSH HELP (BASH): I am trying to write a bash script to determine the gross pay of workers, here is what I have so far what am I missing, I can provide further details if needed. Thanks if [ hours_worked -le 40 ] ; then (rate*hours_worked)+ bonus_pay elif [$hours_worked -gt 40 ] && [$hours_worked -le 54] ; then ((rate*40)+((rate*2)*(hours_worked-40)+ bonus_pay)) && (rate*hours_worked)+ bonus_pay else ((rate*40)+((rate*2)*14)+((rate*3)*(hours_worked-54)+ bonus_pay)) fi

OpenStudy (rsmith6559):

For this type of problem, you may want to consider starting with the largest comparison first and working your way down to the smallest. Your else if code has a "&&" in it. What are you comparing? "&&" is the logical and operator used like: if [[ $THIS && THAT ]] then In BASH, when you want to use the value of a variable, the variable needs to be referred to as $VARIABLE_NAME. You need the '$'. Variables in BASH are held as strings. All math operations require the double parenthesis.

OpenStudy (rsmith6559):

By the way, what does SSH have to do with this?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
16 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
19 hours ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Arizona: does anyone know the percentage rate of 30,000 and 40,000
1 week ago 0 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!