Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 1998 14:20:54 +0200 (SAST)
From:      Matthew West <mwest@cs.uct.ac.za>
To:        Laszlo Vagner <vagner@kf7nn.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: wait for last command
Message-ID:  <Pine.BSF.3.96.980904140750.26974M-100000@gimli.cs.uct.ac.za>
In-Reply-To: <199808310233.VAA04752@mutsgo.kf7nn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 30 Aug 1998, Laszlo Vagner wrote:

> grep data foofile > blahfile
> mail someone < blahfile
> grep -v somedata file2 > blahfile
> mail else < blahfile

> so are they run sequentially and do they wait to complete before
> executing the next line ??

They will be run sequentially, yes.

> i have seen people put && after an executable what is it for?
The command after the && will only be run if the one before it is
performed with no errors.

# cd /tmp && rm *

"rm *" will only be performed if the change into /tmp succedes.  This
makes sure you don't delete the files in the current directory if /tmp
doesn't exist ;-)

--mwest@cs.uct.ac.za
  http://www.cs.uct.ac.za


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.980904140750.26974M-100000>