Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • it's not the same as the OP script, please explain : if a a command fails, the script abort Commented Oct 25, 2012 at 21:06
  • 5
    Additionally, you can use cmd1 || cmd2 separator if you need cmd2 to execute only if cmd1 returned non-zero status to shell, and you may use cmd1 ; cmd2 if you want to run both commands irrespective of their return status. Commented Oct 25, 2012 at 21:08
  • @sputnick It should be, I just pasted it in and concatenated the commands with && Commented Oct 25, 2012 at 21:08
  • 3
    @MarkStevens It's a better implementation but it won't get to the same results as if the commands were run sequentially, I think that's what sputnick meant. Commented Oct 25, 2012 at 21:11