Help on my Linux Homework ! bash shell script / input-output data etc
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Help on my Linux Homework ! bash shell script / input-output data etc
Hi...if some could give me instructions on how to proceed with this assigment....my professor told me that we may use the following commands : awk ,cut,echo,for,grep,if,join,read,sed,sort,trap,while .
Write a bash shell script that presents work information of employees of a department from a company data set. The bash script file should be called "extract" and should be invocable as
$ ./extract
from the command line. The company data set layout is presented in six data files with the following field descriptions.
The script should accept a department number (1/4/5) and output
the name of the department
the name of the manager of the department
the number of projects controlled by the department
the total salary of all employees who work for that department.
Also, the script should prompt the user and repeat the task for another department number if requested.
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
Above is our canned response for homework......
You DO get credit for acknowledging that this is homework, but you need to show what work you have done and ask specific questions. I have to assume that you have already studied all those commands or that the instructor has assigned you the taks of learning them. With that in mind, please tell us more about which commands you understand, and which you do not.
Hi...if some could give me instructions on how to proceed with this assigment....my professor told me that we may use the following commands : awk ,cut,echo,for,grep,if,join,read,sed,sort,trap,while .
Write a bash shell script that presents work information of employees of a department from a company data set. The bash script file should be called "extract" and should be invocable as
$ ./extract
from the command line. The company data set layout is presented in six data files with the following field descriptions.
The script should accept a department number (1/4/5) and output
the name of the department
the name of the manager of the department
the number of projects controlled by the department
the total salary of all employees who work for that department.
Also, the script should prompt the user and repeat the task for another department number if requested.
I agree totally with pixellany....you get points for acknowledging this is homework. However, the point of homework is for YOU to learn.
If you post what you've already written, and state what problems you're having, you'll probably get lots of help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.