Complete.Org: Mailing Lists: Archives: linux-help: June 2001:
[linux-help] Re: Awk & Sed
Home

[linux-help] Re: Awk & Sed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: Awk & Sed
From: John Reinke <jmreinke@xxxxxxxxx>
Date: Mon, 18 Jun 2001 22:07:05 -0500
Reply-to: linux-help@xxxxxxxxx

Since you want to minimize what you need to install, and since perl can do
about anything, I'd suggest starting with perl. It would still probably be
handy in the long run to learn sed and (g)awk.

A while back, Steve Saner started a sort of online perl class for this user
group. It was based on the O'Reilly book "Learning Perl", which I'd highly
suggest for teaching yourself.

For your problem, there is a perl command called "split" which will
separate fields according to a delimiter, such as a tab. Using it, you can
separate and store all the fields of one record into an array - in a single
line of perl.

If you give more specifics, I'm sure someone on the list can give
suggestions for doing it in awk or sed, too. Quite honestly, after I
learned perl, I realized I was too lazy, impatient, and hubristic to bother
with awk. ;-)

John

>I'm looking for anyone comfortable with Awk & Sed (or
>maybe Perl) who would be willing to help me with the
>combined projects of learning these languages, and
>making a script to parse tab delimited files for my
>job.  It's got to run on WinDOS.  (I've already found
>versions of Awk & Sed that are made for DOS.  I've
>also found a version of Perl for DOS.)
>
>I'd like to learn to use Awk & Sed so I can say
>goodbye to my crappy Microsoft macros which aren't
>event compatible between two sequential versions of
>Word.  I've thought of using Perl (not that I've
>totally decided against it), but I'd like to minimize
>the amount of stuff I have to put on each computer to
>make the script work.  Would any of you be willing to help?



-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]