Hmmm, maybe you need to pick up on the regexp (regular expressions) stuff.  This is what you need to powercharge Perl for your parsing needs, and it works great with other languages, too.  Try http://www.regular-expressions.info/tutorial.html for starters.

On 11/15/05, Che Sosa <[EMAIL PROTECTED] > wrote:
Thank you lem,

Do you have a link to a good tutorial on perl switches/commands for one-liner?

Che

On 11/15/05, Lem Tomas <[EMAIL PROTECTED]> wrote:
> Che Sosa wrote:
>
> >Mabuhay PLUG members,
> >
> >I have a problem of parsing text. What I want is to parse certain
> >sequences from hundreds of files and replace them with a certain
> >pattern of text.
> >
> >Is this doable with sh? What tools/programming languages is suitable for this?
> >
> >Che
> >
> >
> might have a hard time with native shell, try perl
>
> perl -p -i.bak -e 's/\bfoo\b/bar/g' *.txt
>
> FWIW, more perl stuff here
> http://www.math.harvard.edu/computing/perl/oneliners.txt
>
> HTH,
> ---lem
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to