I’ve been experimenting with combining command on one line. I’ve found && and ; give the same results. Are these interchangeable or is is there some subtle difference between the two?
Posted by Steve in Linux Users Group.
I’ve been experimenting with combining command on one line. I’ve found && and ; give the same results. Are these interchangeable or is is there some subtle difference between the two?
Posted by Steve in Linux Users Group.
There is a BIG difference between the two. If you use && and if the first command doesn’t run successfully, the second command won’t run.
With ; there is no such thing. The second command will run irrespective whether the previous command succeeded or not.
Very good tp know the difference between && and ;
Thank you
Wicklowham
I drew an infographic explaining that.
Usually, I share the link only if you register on my mailing list. But for itsfoss.community members, here is a direct link to download the PDF
https://drive.google.com/file/d/113ASfatibe4UaX15r_4haumo3BPdluwp
If you want to share that with your friends, please point them to https://www.yesik.it/SHELL10 – or ask them to register on https://itsfoss.community