Explore BrainMass

Explore BrainMass

    Unix Shell Script to Calculate Total Pay and Net Pay

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Develop a Unix shell script to input number of hours worked and pay rate and calculate the total pay, then the social security amount (assume 5%), then the net pay. Do this as a loop until the number of hours worked is zero.

    © BrainMass Inc. brainmass.com December 24, 2021, 7:24 pm ad1c9bdddf
    https://brainmass.com/computer-science/operating-systems/186060

    Solution Preview

    The following script inputs hours worked and pay rate to calculate grossPay. It calculates the social security amount by multiplying the social security rate 5% with the grossPay. Next it deducts this social security amount from the grossPay to calculate the net pay amount. Please remember that bash variables cannot store ...

    Solution Summary

    The following script inputs hours worked and pay rate to calculate grossPay. It calculates the social security amount by multiplying the social security rate 5% with the grossPay. Next it deducts this social security amount from the grossPay to calculate the net pay amount. Please remember that bash variables cannot store fractions, so it is wise to use the utility bc instead of bash. However, in this case we have not used "bc".

    $2.49

    ADVERTISEMENT