shell scripting
Ping
songpingemail at gmail.com
Sat Nov 9 17:01:59 UTC 2013
there is no good way with pure shell script without using expect-like kind of tools..
from iPhone
On Nov 10, 2013, at 0:23, pluto mars <plutomars955 at gmail.com> wrote:
> Hi,
>
> I need some help with shell scripting (/bin/sh) in ubuntu.
>
> In a shell script I want to turn down an interface, say eth0 and then turn it up.
> So something like
>
> ifdown eth0
> ifup eth0
>
> But what I want in my shell script is to check and wait till eth0 is up and then start doing something next in my shell script.
> So something like "if ( eth0 not is up ) { sleep 1 }. But how do I do this in shell scripting ?
>
> And then also I want something similar for checking if syslog process is up or not. Because actually I am writing syslog through that interface to another computer. So I want to check if eth0 is up. If up, check if syslog process is up, if not start, if yes, write something to syslog.
>
> regards,
>
> pluto
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
More information about the ubuntu-users
mailing list