Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 1998 13:56:58 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        laszlo vagner <vagner@mutsgo.dyn.ml.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: fetch and kill
Message-ID:  <Pine.BSF.3.96.980429135550.13203I-100000@gdi.uoregon.edu>
In-Reply-To: <199804240855.DAA03105@mutsgo.dyn.ml.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 24 Apr 1998, laszlo vagner wrote:

> can someone please send me a script to do this as i am not
> too good at knowing script language yet.
> 
> i want to fetch a webpage and if it doesn't return the page, i want
> to hang up the modem and redial or kill and restart ppp (same result).
> 
> someone suggested something like
> 
> fetch http://www.freebsd.org/index.html || kill ppp
> 
> or something to this effect, i dont know what || means?

|| is the OR short-circuit operator.  The shell executes the command in
front of the ||; if it fails (ie returns an error code != 0) then it
executes the right hand side.  Otherwise it skips it.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980429135550.13203I-100000>