Run multiple Linux commands, one after the other

Run commands after another
Ex.

mkdir temp & cd temp & ls

Run commands after another if the previous command SUCCEEDS
Ex.

mkdir temp && cd temp && ls

Run commands after another if the previous command FAILS
Ex.

mkdir temp || echo 'mkdir failed'

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.