Explore BrainMass

Explore BrainMass

    Linux shell script to compute the bonus for a salesperson

    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!

    Convert the following pseudocode into a Bash script:

    - Read SalesPerson and QuarterlySales from the keyboard.
    - Display an appropriate message regarding the bonus when the QuarterlySales for the SalesPerson falls within these ranges:
    $1,000,000 and above : Bonus = $1,500
    $100,000 to $999,999 : Bonus = $750
    $99,999 and below : No Bonus

    Test the script with the following data:
    Mike 67000
    Bob 99000
    Peter 100000
    Lisa 250000
    Joan 999999
    Mary 1000000.

    © BrainMass Inc. brainmass.com March 4, 2021, 8:16 pm ad1c9bdddf
    https://brainmass.com/computer-science/pseudocode/linux-shell-script-compute-bonus-salesperson-156620

    Solution Preview

    Please "chmod +x" the attached script (156620.sh) to turn on the executable bit, ...

    Solution Summary

    Solution gives a well commented Bash script that computes the bonus for one salesperson in one execution of the script. Implementation uses if-then-else and here-document features of Bash scripting.

    $2.49

    ADVERTISEMENT