[Gllug] OT: Tomcat & Apache mapping problem

David Damerell damerell at chiark.greenend.org.uk
Thu Mar 24 12:39:57 UTC 2005


On Wednesday, 23 Mar 2005, Mike Brodbelt wrote:
>On Wed, 2005-03-23 at 15:33 +0000, Steve Nelson wrote:
>>On Wed, 23 Mar 2005 15:18:11 +0000, Mike Brodbelt
>><mike at coruscant.demon.co.uk> wrote:
>>>cat /etc/passwd | awk -F: '{print $7}'
>>Or to avoid unnecessary cat and pipe usage:
>>cut -d: -f 7 /etc/passwd
>Ah, but I like cats :-).

Mmm. There is a general observation here that all operations of the
form;

cat one-file | operation

can be replaced with;

< one-file operation

Hence you could do < /etc/passwd awk -F: '{print $7}'

[although I would still use cut for an operation of this kind.]

-- 
David Damerell <damerell at chiark.greenend.org.uk> Kill the tomato!
Today is Second Gouday, March.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list