Re: V. basic script question
>
> I'm on a dial on demand connection and I have this script in
> /etc/ppp/ip-up.d/ for having the mail fetched from my ISP everytime I
> make a connection, and then sent locally:
>
> ----- start script -----
> #!/bin/sh
>
> /usr/bin/fetchmail -f /etc/fetchmailrc -a -u a4608456
>
> /usr/sbin/sendmail -q
> ----- end script -----
>
> now, this works alright but I'd like to know when everything is over
> with a message echoed on screen... how do I go about that?
I don't know exactly what you mean by `echo on the screen'. The most
basic thing would be to print in the terminal where the script runs:
echo Ready.
If you want a window to pop up, you might use xmessage from the xcontrib
package:
xmessage It\'s done. &
Yet another way would be
xterm -e sh -c 'echo All is done; read a' &
The `read a' portion is used here to wait for someone to hit <enter>.
If the ppp script is not running as the user that runs the X11 session
(I don't know, never used ppp), then you may have to put something like
xhost +localhost
in your .xsession file to allow the window to pop up.
HTH,
Eric Meijer
--
E.L. Meijer (tgakem@chem.tue.nl)
Eindhoven Univ. of Technology
Lab. for Catalysis and Inorg. Chem. (SKA)
Reply to: