[mdlug] Difference between ; and &&

Brian Brodsky brianbrodsky at ameritech.net
Wed May 9 09:32:23 EDT 2012


My bad you had it right. it should be

apt-get update || echo "My apt-get failed"



On 5/9/2012 9:03 AM, Brian Brodsky wrote:
> Shouldn't that be
>
> apt-get update || echo "My apt-get succeeded"
>
>
>
>
> On 5/9/2012 8:50 AM, Wojtak, Greg (Superfly) wrote:
>> There is also the logical OR:
>>
>> apt-get update || echo "My apt-get failed"
>>
>>
>>
>> On 2012-05-09 8:31 AM, "Brian Brodsky"<brianbrodsky at ameritech.net>   wrote:
>>
>>> 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
>>>>
>>> _______________________________________________
>>> mdlug mailing list
>>> mdlug at mdlug.org
>>> http://mdlug.org/mailman/listinfo/mdlug
>> _______________________________________________
>> mdlug mailing list
>> mdlug at mdlug.org
>> http://mdlug.org/mailman/listinfo/mdlug
>>
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug
>



More information about the mdlug mailing list