[clug] Please help
Martin Pool
mbp at samba.org
Tue Jun 1 07:47:26 GMT 2004
On 1 Jun 2004, "Crosskey, Jason (DPS)" <Jason.Crosskey at aph.gov.au> wrote:
> I can't get this script to work in bash, see bleow, but it works in ksh.
> Variables get lost after the while loop is done in bash which causes the
> problem, but I don't know how to fix it.
>
> hostfile=/etc/hosts
>
> echo "This program will find a host name in $hostfile"
> echo "Enter an IP address:" ;read findIP
>
> while test "$findIP" != 999
> do
> cat $hostfile | while read line
maybe
while read line < $hostfile
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20040601/94786ba8/attachment.bin
More information about the linux
mailing list