[Gllug] Bizarre shell behaviour
Dylan
dylan at dylan.me.uk
Fri Nov 7 23:27:51 UTC 2003
On Friday 07 November 2003 17:16 pm, Tethys wrote:
> Take the following shell script. Run it:
>
> #!/bin/sh
>
> count=0
> while read var
> do
> count=1
> done < /etc/group
>
> echo $count
Just out of interest (and 'cos I'm trying to learn shell scripting) can
someone explain what this is supposed to achieve. The loop is obvious, but
what's the redirection all about?
Cheers
Dylan
--
Sweet moderation
Heart of this nation
Desert us not
We are between the wars
- Billy Bragg
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list