[Gllug] OT: Tomcat & Apache mapping problem

Rich Walker rw at shadow.org.uk
Wed Mar 23 15:46:31 UTC 2005


Steve Nelson <sanelson at gmail.com> writes:

> On Wed, 23 Mar 2005 15:18:11 +0000, Mike Brodbelt
> <mike at coruscant.demon.co.uk> wrote:
>
>> If I want to see what shells people have, I just do:-
>> 
>> cat /etc/passwd | awk -F: '{print $7}'
>
> Or to avoid unnecessary cat and pipe usage:
>
> cut -d: -f 7 /etc/passwd

The other day, I wanted to strip the last component from a bunch of
filenames in a file. cut doesn't support "last"-referencing, so;

rev file | cut -d'/' -f 2- | rev > new_file

cheers, Rich.


-- 
rich walker         |  Shadow Robot Company | rw at shadow.org.uk
technical director     251 Liverpool Road   |
need a Hand?           London  N1 1LX       | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list