[mdlug] Difference between ; and &&

Brian Brodsky brianbrodsky at ameritech.net
Wed May 9 08:31:03 EDT 2012


The first set will execute both commands one after the other no matter 
what. The second will only execute the second command if the first one 
is successful.

On 5/9/2012 8:12 AM, Mat Enders wrote:
> Hello all,
>
> When stringing commands together at the command line I always use the
> semicolon ;  I however see&&  used frequently and was wondering what
> the difference was.
>
> For example what is the difference between these commands:
>
> apt-get update;apt-get dist-upgrade
> and
> apt-get update&&  apt-get dist-upgrade
>



More information about the mdlug mailing list