[Gllug] Script for splitting dirs
Daniel Andersson
daniel at septum.org
Tue Jun 3 13:26:50 UTC 2003
> On Tue, Jun 03, 2003 at 02:00:50PM +0100, Daniel Andersson wrote:
> > > itsbruce at uklinux.net writes:
> > >
> > > >Use Perl. This would be a complete pain to do as a shell script.
> > >
> > > Not really. The only issue is getting the filesize, which is either
> > > done by parsing the output of ls, or calling a helper application.
> >
> > haven't really followed this
> > but what about using "filesize", no need to parse output of ls
>
> No such binary on my system, nor is there such a builtin command in
> any of the standard shells, afaik. Where are you getting that from.
bash, linux
woops, i'm being a lamer
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 ' '`"
/ d
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list