[ale] HELP Scripting gurus

Ben Coleman oloryn at benshome.net
Wed Apr 24 10:04:04 EDT 2002


On 24 Apr 2002 09:38:03 -0400, Fletch wrote:

>>>>>> "Thomas" == Thomas Mazukna <Mazukna> writes:
>
>    Thomas> HELP!  need to find out lines in a text file where chars
>    Thomas> 57-58 = "12" awk or sed is capable of doing this ?
>
>        perl -lane 'print if substr($_,57,2) eq "12"'

Why the l and a switches?  You're not doing anything with @F, so -a
isn't needed, and -l just results in every line getting chomped, and
the \n being added back on when printing.  Might as well leave the \n
on the end of the line anyway.

Ben
-- 
Ben Coleman oloryn at benshome.net      | The attempt to legislatively
http://oloryn.home.mindspring.com/   | micromanage equality results, at
Amateur Radio NJ8J                   | best, in equal misery for all.



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list