LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Closed Thread
  Search this Thread
Old 11-21-2011, 02:57 AM   #1
engrmilad
LQ Newbie
 
Registered: Nov 2011
Posts: 11

Rep: Reputation: Disabled
urgent urgent, need help please with bash script to pass exam...


hi friends, hope you are doing well...

Guys I wanna tell you that I have a bash script exercise that I need it to be configured for me to pass my scripting class, but the problem is our teacher is bad as shit and he does nothing more than chucking the sheets on us, and whenever you wanna ask him something he goes like "well you are supposed to figure it out yourself" the issue is we are all lost students, and I am trying my best and I bought all the
CBT Nuggets scripting videos, but I cant get nothing for now.. and my exercises should be handed over ssh Putty login to Centos server this week, so guys please help me to just pass my subject, and I will defiantly work on CBT Nuggets Videos to learn more and more, I even still needs to do my work, I work security, but human one not a software lol.. the question is:



you need to be able to develop an algorithmic statement of a solution for the following process's.

{{{{{{{{ A compnay called Buckaroo Banzi has contacted you and wants you to create a script to automate network management processes.

you are to create a script that will run from the command line as well as interactively (i.e. a script that runs with a menu or runs with the command line with parameters, both options are to work either the menu runs or if parameters the command line runs.) to do the following:

PART 1\ Make copy of network files ( create a function that copies the files) to /home/backup.

the script is to make a copy of the following files to a directory called /home/backup: (Note you will have to create the directory if it does not exist use mkdir)

List of files to copy:

/etc/hosts

[ Contains a list of known hosts in the local network. can be used if the IP of the system is not dynamically generated. For sample host name resolution to dotted notation, /etc/hosts.conf normally tells the resolver to look here before asking the network nameserver, DNS or NIS ]

/etc/hosts.allow
[ Man page same as hosts_access. Read by tcpd at least. ]

/etc/hosts.deny
[ Man page same as hosts_access. Read by tcpd at least. ]

/etc/fstab
[ lists the file system currently "mountable" by the computer. This is important because when the computer boots, it runs the command mount -a, which takes care of mounting every file system marked with a "1" in the next-to-last column of fstab. ]

/etc/group
[ Contains the valid group names and the users included in the specified groups. A single user can present in more than one group if he performs multiple tasks. For example, is a "User" is the administrator as well as a memebr of the project group "project 1", then his entry in the group file will look like: user: * :group-id : project1 ]

etc/passwd
[ See "man passwd". Holds some user account info including passwords (when not "shadowed"). ]

/etc/sysconfig/network-scripts/if*

[ Red Hat network configration scripts. ]


When the files are copied they are to be compressed using gzip to the file called "compfiles".
=====================================================


PART 2\

you are to check the messages log in /var/log/messages for problems in DNS (these messages are found by using "grep named /var/log/messages" where named is the dns daemon.) cut out the entry's then append them to a file called "problog" in a file that is in the directory ~/backup This can be done using cut and grep.

============================================
Option Work Part 3\

Using the script monitorzz convert the script into a function in the above script and give a menu option that allows the user to interactivlly test the dns is working ok.

==========================

Option Work Part 4\

Use the curl daemon to monitor a configured web site www.evo.com.au to determine if the web page is up and running.


=========================================

Option Work Part 5\
Use of the snmp daemon to get goodput for the NIC. The statistics are to be graphed interactively. }}}}}}}}


Please guy please help me pass the subject, and I will donate if you guys like no problem at all..

heaps heaps heaps of thanx brothers.. you are always the smarter and the best..

Regards

Last edited by engrmilad; 11-21-2011 at 02:59 AM. Reason: wrong spelling
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-21-2011, 03:09 AM   #2
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by engrmilad View Post
urgent urgent, need help please with bash script to pass exam...
Not urgent.

Quote:
Originally Posted by engrmilad View Post
you need to be able to develop an algorithmic statement of a solution for the following process's.

{{{{{{{{ A compnay called Buckaroo Banzi has contacted you and wants you to create a script to automate network management processes.
You copied entire assignment and are asking to people to do it instead of you. If you want help from other people, show what you have already done, and tell which part you have problem with. Your current question implies that you have done nothing at all.

For brief list of command in terminal type "help" (on linux system).
For detailed help type in terminal "info bash" and start reading.

Quote:
Originally Posted by engrmilad View Post
I will donate if you guys like no problem at all..
If you have too much cash you could in theory hire somebody to do it instead of you, but:
  • You can't do that here (linuxquestions forbids such commercial activity), and you need to go to some kind of freelancing resource.
  • It will backfire later. For example, material covered by excercise may pop up in exam or during the course of your job, and you will fail it because you didn't do the assignment.
 
3 members found this post helpful.
Old 11-21-2011, 03:38 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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.
 
Old 11-21-2011, 03:51 AM   #4
engrmilad
LQ Newbie
 
Registered: Nov 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SigTerm View Post
Not urgent.


You copied entire assignment and are asking to people to do it instead of you. If you want help from other people, show what you have already done, and tell which part you have problem with. Your current question implies that you have done nothing at all.

For brief list of command in terminal type "help" (on linux system).
For detailed help type in terminal "info bash" and start reading.


If you have too much cash you could in theory hire somebody to do it instead of you, but:
  • You can't do that here (linuxquestions forbids such commercial activity), and you need to go to some kind of freelancing resource.
  • It will backfire later. For example, material covered by excercise may pop up in exam or during the course of your job, and you will fail it because you didn't do the assignment.
well relax smart Mr.SigTerm .. and if you checked what I have wrote you will know that our teacher dont give a shit about nothing.. so dont come and blame the students please..and if you were lucky with however taught you dont come here and be smart ass on me, just simply shut up and dont help..
 
0 members found this post helpful.
Old 11-21-2011, 03:55 AM   #5
jhw
Member
 
Registered: Apr 2010
Posts: 83

Rep: Reputation: 32
Quote:
Originally Posted by engrmilad View Post
well relax smart Mr.SigTerm .. and if you checked what I have wrote you will know that our teacher dont give a shit about nothing.. so dont come and blame the students please..and if you were lucky with however taught you dont come here and be smart ass on me, just simply shut up and dont help..
I would be careful with statements like that. I for example did not have anybody to teach me anything I know of GNU/Linux today. And I am perfectly capable of solving the assignment you have posted. Basically, all you need for this is knowing how to use Google. At least that's how I solved all of my GNU/Linux problems during the past six years.
 
3 members found this post helpful.
Old 11-21-2011, 04:00 AM   #6
engrmilad
LQ Newbie
 
Registered: Nov 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colucix View Post
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.
I really appreciate that for you sir, but the problem is we are all not confident of this subject and all what I know is copying the weekly solved exercises from the sheets and make new files and typed them and save them,, just like we have developed out typing skills.. we always needed someone to explain to us more but there was no response at all. and now am trying to pass because I have not time to learn everything now.. I tried to understand something but I couldnt and I am not lazy as what Mr.SigTerm said, because if I was lazy I would have posted this exercise 4 weeks ago but thought I might learn something and handle it myself.. anyways ..

Thank you sir..
 
Old 11-21-2011, 04:23 AM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
read the textbook
-- or --
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.linuxcommand.org/index.php
 
2 members found this post helpful.
Old 11-21-2011, 04:27 AM   #8
engrmilad
LQ Newbie
 
Registered: Nov 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jhw View Post
I am perfectly capable of solving the assignment you have posted.
can you please then help us pass for now ??

thanx
 
0 members found this post helpful.
Old 11-21-2011, 04:46 AM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
These will help:

http://tldp.org/LDP/Bash-Beginners-G...ers-Guide.html
http://tldp.org/LDP/abs/html/
 
1 members found this post helpful.
Old 11-21-2011, 05:04 AM   #10
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
Quote:
Originally Posted by engrmilad View Post
if I was lazy I would have posted this exercise 4 weeks ago but thought I might learn something and handle it myself.
Then post here what you tried on this subject during those 4 weeks, and maybe someone can help.
 
Old 11-21-2011, 08:29 AM   #11
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by engrmilad View Post
but the problem is our teacher is bad as shit and he does nothing more than chucking the sheets on us, and whenever you wanna ask him something he goes like "well you are supposed to figure it out yourself"
Perhaps your teacher is bad like this because during his education he also had his homework assignments made by others?

jlinkels
 
2 members found this post helpful.
Old 11-21-2011, 08:52 AM   #12
Juako
Member
 
Registered: Mar 2010
Posts: 202

Rep: Reputation: 84
Quote:
Originally Posted by engrmilad View Post
well relax smart Mr.SigTerm .. and if you checked what I have wrote you will know that our teacher dont give a shit about nothing.. so dont come and blame the students please..and if you were lucky with however taught you dont come here and be smart ass on me, just simply shut up and dont help..
First: Referring to other members telling them to "relax" and "shut up", and pejoratives like "smart Mr.SigTerm" and "smart ass" won't likely gain you much help from anyone.

Second, if your teacher doesn't care for anything that's what matters the least, actually. Do YOU care to learn? Instead of ranting or asking for us to solve your work verbatim, ask for specific questions: what do you don't understand? what do you DO understand?

A pity you didn't decide to ask for help earlier, now you wouldn't be in the hurry.

Last edited by Juako; 11-21-2011 at 11:22 AM.
 
2 members found this post helpful.
Old 11-21-2011, 11:13 AM   #13
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
When I was studying it was pretty much down to the students to research and look up things. The teacher wasn't going to spoonfeed us anything and would only help with suggestions in a general way. That was taken for granted by the students. It is important to learn how to do research yourself. It's beyond the scope of most classes to teach shell scripting in depth.
 
Old 11-21-2011, 11:29 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by engrmilad View Post
I really appreciate that for you sir, but the problem is we are all not confident of this subject and all what I know is copying the weekly solved exercises from the sheets and make new files and typed them and save them,, just like we have developed out typing skills.. we always needed someone to explain to us more but there was no response at all. and now am trying to pass because I have not time to learn everything now.. I tried to understand something but I couldnt and I am not lazy as what Mr.SigTerm said, because if I was lazy I would have posted this exercise 4 weeks ago but thought I might learn something and handle it myself.. anyways ..

Thank you sir..
"Copying" is not "learning".

And the one thing you're not getting is this: say we do your work for you. You will then go on, and NOT know what you're doing...making any assignments from this point forward MORE difficult. None of us here are doing your class...and we all know how to use Google to look up THOUSANDS of bash-scripting tutorials, and would put some effort into it.

Others have said it: post what you've done/tried, and tell us where you're stuck. Otherwise, why should we take your word that you've been working hard for 4 weeks to try to do this on your own, rather than take the obvious answer, and assume you're too lazy to do it yourself?
 
Old 11-21-2011, 11:30 AM   #15
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
And you still haven't said what, if anything, you've tried.

If shell scripting is too much for you then clearly you're doing the wrong course...
 
  


Closed 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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot sector and lilo collapse !!!!! URGENT URGENT URGEN !!!!! frelihm Linux - Software 21 12-02-2009 10:21 AM
Urgent : creating folder using bash script prernasin Linux - Newbie 2 09-26-2007 01:58 AM
need urgent help with bash script ferradura Linux - General 4 09-11-2007 04:32 PM
Urgent Urgent !!!! Mozilla Keeps All Your Deleted Emails !!!! odin123 Linux - Software 2 01-31-2004 02:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration