[Gllug] print grep var in awk shell script?
Richard Huxton
dev at archonet.com
Fri Mar 5 13:33:32 UTC 2004
On Friday 05 March 2004 13:27, Stuart Sears wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday 02 Mar 2004 14:59, Liam Delahunty wrote:
> > This little script is supposed to count how many times users get mail to
> > their username account or log in.
> >
> > It works okay but I'd like to display it better.
> >
> > #!/bin/bash
> > for username in `ls -l /home/spool/mail/|grep site26| awk '{print $9 }'`
> > do
> > echo $username
>
> this adds the carriage return. Use printf instead.
Or just "echo -n"
--
Richard Huxton
Archonet Ltd
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list