Re: newbie: need inspiration
From: Daniel W. (daw..._at_aon.at)
Date: 08/28/05
- Previous message: Chris F.A. Johnson: "Re: newbie: need inspiration"
- In reply to: Daniel W.: "newbie: need inspiration"
- Next in thread: Jakub.Laszczynski_at_gmail.com: "Re: newbie: need inspiration"
- Reply: Jakub.Laszczynski_at_gmail.com: "Re: newbie: need inspiration"
- Reply: Ed Morton: "Re: newbie: need inspiration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Aug 2005 02:58:28 +0200
Daniel W. wrote:
> hello,
> [....]
thanks for your support.
I've hacked this simple script.
I know it isn't very efficient but as I said I'm a newbie in shell
programming.
Does anybody knows a good online-tutorial? The most I've found
are incomplete. I haven't found how to break more than one loop and
similar things.
But I'm happy with this working script.
greetings,
daniel
#!/bin/bash
bEnd=0
/usr/sbin/speedmgmt &
printf "initialize modem and waiting as long as the modem is ready...\n"
while true
do
tail /var/log/messages > goonline.tmp
grep "Modem initialised" goonline.tmp > /dev/null
if expr $? '=' 0 > /dev/null; then
break
fi
sleep 1
printf "."
done
printf "\n"
printf "modem seems to be ready, go on\n"
while true
do
printf "dialing...\n"
pppd call aon > /dev/null
while true
do
tail /var/log/messages > goonline.tmp
grep "remote IP address" goonline.tmp
if expr $? '=' 0 > /dev/null; then
bEnd=1
break
fi
sleep 1
printf "$i \r"
let i=$i+1
if (test $i -gt 8)
then
break
fi
done
if (test $bEnd -eq 1)
then
break
fi
i=0
printf "ERROR, call again\n"
done
printf "you are online\n"
- Previous message: Chris F.A. Johnson: "Re: newbie: need inspiration"
- In reply to: Daniel W.: "newbie: need inspiration"
- Next in thread: Jakub.Laszczynski_at_gmail.com: "Re: newbie: need inspiration"
- Reply: Jakub.Laszczynski_at_gmail.com: "Re: newbie: need inspiration"
- Reply: Ed Morton: "Re: newbie: need inspiration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|