LinuxQuestions.org
Help answer threads with 0 replies.
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


Reply
  Search this Thread
Old 02-10-2010, 08:42 AM   #1
puth
LQ Newbie
 
Registered: Feb 2010
Posts: 19

Rep: Reputation: 0
Unhappy Schell script needed


Hi

aaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaaaaa

Thanks

Last edited by puth; 02-10-2010 at 10:04 AM. Reason: dont need help
 
Old 02-10-2010, 09:25 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Nice explanation of what you need to do but what exactly is it that you need help with in writing this shell script yourself? In other words: what have you tried (code) and where did you fail?

Code:
function help() { echo "Bash scripting guides:
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html 
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html 
http://www.tldp.org/LDP/abs/html/ 
http://wooledge.org/mywiki/BashFAQ?action=show&redirect=BashFaq"; }
 
Old 02-10-2010, 09:31 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by puth View Post
Please let me know if you have any questions.
I have some:
Title of the course you are taking?
What books or other reference material are you using?
Is this your first scripting assignment?
Which part do you need help with?
 
1 members found this post helpful.
Old 02-10-2010, 09:39 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
And what do you do if the number of servers on a domain is exactly 8?
You could implement a solution exactly as described but which would fail if there are 8 servers because the description isn't exact enough.
 
Old 02-10-2010, 01:12 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
A comment to the OP : Not very polite to delete a post,
please use "mark as [SOLVED]" instead. And better read the LQ Rules.

The original text, post # 1 is : ( got it from Google "news feed")



Hello Everyone,

I need help in writing this shell script.

I have a file which has the below code in it.I need to take the domain name from the user and check in the file the count of the SERVERS(A-Z) for a domain.If the number of servers <8 then i need to insert my part of code at the end of the last server for that domain.If the number of servers greater than 8 then i need to go to the next server name(like C if B is full or D if C is full) and verify the count and insert my text at the end of the last server for that domain.

CPUNAME ****
DOMAIN X
------
-----
------
------
SERVER C
END

CPUNAME ****
DOMAIN X
------
-----
------
------
SERVER C
END

CPUNAME ****

DOMAIN X
------
-----
------
------
SERVER D
END

Please let me know if you have any questions.

Last edited by knudfl; 02-10-2010 at 01:19 PM.
 
Old 02-10-2010, 01:22 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What we have here is what I call a "homework drive-by"----the chances of ever seeing this member again are quite small.
 
  


Reply



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
script help needed: patilvidya Linux - Software 2 08-29-2007 08:53 AM
Script needed ganeshinforum Programming 2 01-05-2007 07:29 AM
Bash schell ??? russbo97 Linux - Newbie 5 11-08-2006 11:58 PM
little script help needed abisko00 Programming 7 07-11-2005 08:37 AM

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

All times are GMT -5. The time now is 10:21 PM.

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