Explore BrainMass

Explore BrainMass

    Bash scripts for payslip and grade display

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

    I want to answer the following questions
    Q1)Write a shell script to to print the payslip of an Employee.

    Q2)Write a shell script to display grade of student according to his marks.

    © BrainMass Inc. brainmass.com October 10, 2019, 8:13 am ad1c9bdddf

    Solution Preview

    Since no information is provided, this solution makes following assumptions for the scripts.

    1. In payslip generation, gross salary is computed adding 20% dearness allowance and 10% house rent allowance to basic salary.

    2. Marks are converted to grade using following scheme:
    A : [80,100], B : [60,80), C : [40,60), D : [30,40), F : [0,30)

    Here [] indicates closed interval, and [) indicates semi-closed interval open on the right side. So [a,b] indicates the range a <= x <= b, and [a,b) indicates the range a <= x < b.

    Attached 614488.zip contains two files: ...

    Solution Summary

    Solution provides commented Bash shell scripts, and sample output produced by running these scripts.
    Since specific details are not provided in question, this solution computes gross salary by adding 20% dearness allowance and 10% house rent allowance to basic salary, and converts marks to grade using these ranges - A : [80,100], B : [60,80), C : [40,60), D : [30,40), F : [0,30).