Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Removing text between braces
"Janis Papanagnou" <Janis_Papanagnou@hotmail.com> wrote in message
news:cqv8sp$e0p$2@online.de...
> awk '/{/,/}/ { next } 1'

Thanks!  That worked like a charm & much easier than my solution :)

One final question:  is there an option in gawk that allows you to modify a
file in-place (like SED's -i option)?  In my original script I was closing
the original file and then writing over it (since I had already read
everything into an array).  I'm using GNU Awk 3.1.0 and I don't see any such
option.



Report this thread to moderator Post Follow-up to this message
Old Post
Frank
12-30-04 01:55 AM


Re: Removing text between braces
Frank wrote:
> "Janis Papanagnou" <Janis_Papanagnou@hotmail.com> wrote in message
> news:cqv8sp$e0p$2@online.de...
> 
>
> Thanks!  That worked like a charm & much easier than my solution :)
>
> One final question:  is there an option in gawk that allows you to modify 
a
> file in-place (like SED's -i option)?  In my original script I was closing
> the original file and then writing over it (since I had already read
> everything into an array).  I'm using GNU Awk 3.1.0 and I don't see any su
ch
> option.

I either don't know of any awk option; you'll have to do a file move, e.g.

awk '...' <orig >new ; mv new orig

If you insist to do it inplace you may want to use perl instead of awk.
Your choice.

Janis

Report this thread to moderator Post Follow-up to this message
Old Post
Janis Papanagnou
12-30-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

AWK archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:40 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.