Programming This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-03-2009, 11:26 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2009
Posts: 1
Rep:
|
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.
|
|
|
|
03-03-2009, 11:32 AM
|
#2
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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.
|
|
|
|
03-03-2009, 12:51 PM
|
#3
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,817
|
Quote:
Originally Posted by Bebelindo
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:43 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|