The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
BASH: Any Way to Get User Input Without Requiring Them to Hit the Enter Key? deckard Shell Programming and Scripting 2 03-06-2009 10:35 AM
Qmail requiring SMTP auth vertigo23 UNIX for Dummies Questions & Answers 0 12-22-2005 05:04 PM
A complete Unix Newbie Afinita UNIX for Dummies Questions & Answers 2 03-07-2004 03:06 PM
complete newbie davidjk UNIX for Dummies Questions & Answers 2 08-08-2002 09:24 AM
Complete Newbie Question Dpinion UNIX for Dummies Questions & Answers 1 12-21-2000 03:35 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-25-2009
snoops snoops is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 3
Complete Newbie requiring help

Greetings

Just joined this forum and a complete newbie. So please be gentle

I've never really scripted before nor had a project where I required to write some code. However I have a large project which I am currently doing by manually. I was wondering if someone could help me determine what scripting language to use and possibly help with assisting me with what needs to be done.

I have a file with entries in the following format

[some text.......RedHat]
rubbish text
more text

more text


[some text.......SUSE]
rubbish text
more text

more text


[some text.......Solaris]


What I would like to create is a script that takes arguments (in this case RedHat,SUSE and Solaris] and then searches a file. When it reaches the first argument it copies the entire section starting from [ and ending when it gets to the next [.

With each section, it replaces 'rubbish' with 'good' and it saves it to a file in the format <argument>.txt

Thank you for any help offered or advice offered.

Snoops
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0