Grep options

Luca liliana.perossa at
Mon Oct 30 10:50:51 PST 2006

Dan Nicholson wrote:
> On 10/30/06, Ken Moffat <ken at> wrote:
>> > 2) How do I list in the only the third column (the
>> timezone one)?
>> >
>>  I'm not sure I understand what you want to do.  No doubt there
>> are many ways of listing only the third column, but something like
>>  cat | awk '{ print $3 }'
>> will print the whole file's zones.  So, if you want to limit this to
>> the zones in a particular country, such as e.g. Greenland (to get
>> multiple entries)
>>  grep '^GL' | awk '{ print $3 }'
>>  These sort of general questions are probably better directed to
>> lfs-chat, please reply there.  Thanks.
> Just had to jump in here. awk is all you need in this case because it
> does regex searches sort of like sed syntax.
> awk '/^GL/{ print $3 }'
> -- 
> Dan
Good evening!

Thanks Ken and Dan...
I'll now try

btw Dan, I replied to the coreutils problem in cross-lfs that was solved
by passing 'std=gnu99'.


More information about the lfs-support mailing list