[Gllug] Script for splitting dirs

itsbruce at uklinux.net itsbruce at uklinux.net
Tue Jun 3 16:11:34 UTC 2003


On Tue, Jun 03, 2003 at 03:22:32PM +0100, Tethys wrote:
> 
> "Daniel Andersson" writes:
> 
> >daniel at cj:/usr/bin# more filesize
> >#!/bin/sh
> >#
> ># Print the size of a file, in bytes.
> >#
> >echo -n "`ls -l $1 | tr -s ' ' | cut -f 5 -d ' '`"
> 
> Oh. A perfect example of the perils of incorrect quoting:

And one reason (of many) why Perl would be a more suitable tool in this
case.  You wouldn't even need taint checks on.

-- 
Bruce


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list