Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-amd64
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-amd64@g.o
From: "Martin Herrman" <martin@...>
Subject: Re: How to use &&
Date: Sun, 4 Jan 2009 15:35:52 +0100
On Sun, Jan 4, 2009 at 3:31 PM, Maciej Kazulak <kazulakm@...> wrote:

> The reason only the first command was executed can be that it returned a
> non-zero exit status. If you want to make sure every command gets a chance
> to execute, regardless of what the exit status of the previous one is,
> substitute '&&' with ';'. Check this out:
> box% false && echo "will not be echoed"
> box% false; echo "hello"
> hello
> box%
>
> That's how bash evaluates logic expressions. There's even a fancy word for
> it i think. Point is it will execute commands only to the point where it can
> determine the logic result. So above if the first element is false there's
> no need to execute echo as the logic result is already known to be false.

hehe, didn't think about using a ; that would work as well :-)
(but if you have A to Z, your command will be much longer than just
the for-loop in script 1)

BTW, you might want to output all to a file using >> "/home/Fred
Music/output.log" and view it using a "tail -f /path/file". Run
mp3gain quiet and grep the output.log file for errors/failures..


Replies:
Re: How to use &&
-- Paul Stear
References:
How to use &&
-- Paul Stear
Re: How to use &&
-- Martin Herrman
Re: How to use &&
-- Paul Stear
Re: How to use &&
-- Maciej Kazulak
Navigation:
Lists: gentoo-amd64: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: How to use &&
Next by thread:
Re: How to use &&
Previous by date:
Re: How to use &&
Next by date:
Re: How to use &&


Updated Jun 17, 2009

Summary: Archive of the gentoo-amd64 mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.