From owner-freebsd-questions Fri Sep 4 05:22:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA14870 for freebsd-questions-outgoing; Fri, 4 Sep 1998 05:22:50 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gimli.cs.uct.ac.za (gimli.cs.uct.ac.za [137.158.128.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA14855 for ; Fri, 4 Sep 1998 05:22:35 -0700 (PDT) (envelope-from mwest@gimli.cs.uct.ac.za) Received: from mwest (helo=localhost) by gimli.cs.uct.ac.za with local-smtp (Exim 1.92 #1) id 0zEurG-0007H9-00; Fri, 4 Sep 1998 14:20:54 +0200 Date: Fri, 4 Sep 1998 14:20:54 +0200 (SAST) From: Matthew West To: Laszlo Vagner cc: questions@FreeBSD.ORG Subject: Re: wait for last command In-Reply-To: <199808310233.VAA04752@mutsgo.kf7nn.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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