bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem around brackets, && and ||


From: Greg Wooledge
Subject: Re: Problem around brackets, && and ||
Date: Mon, 3 May 2010 15:25:30 -0400
User-agent: Mutt/1.4.2.3i

On Mon, May 03, 2010 at 07:49:12PM +0200, Kunszt Árpád wrote:
> Description:
>         If the last command in a {...} has && and fails and the {...}
> has an || outside then the outside command will be executed.

Use if/then/else/fi instead of && ||.  Using && || is dangerous, as I've
explained here:

http://mywiki.wooledge.org/BashPitfalls#cmd1_.26.26_cmd2_.7C.7C_cmd3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]