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.

Required fields*

4
  • 1
    this is not /quite/ right, ; starts the next command as soon as the first one ended. & actually puts the command to the background. just try this: echo foo & echo bar & echo test & Commented Mar 6, 2013 at 10:08
  • 1
    @Finkregh, of course. Nobody doubts that. I just meant they both separate commands (from a syntax point of view) with no implications on how they are run. Commented Mar 6, 2013 at 10:57
  • 1
    It's not quite what was asked, since the question specified issuing a "single command". Neither is my answer, as it too is a series of commands, but it has at least one semantic of a single command in that output is concatenated, can be redirected, etc. Commented Mar 7, 2013 at 0:57
  • "Multiple commands with a single command" seems to be an oxymoron, though - what does that mean? If this is for something like sudo so you could enter the password only once, wrap then in bash -c or similar. Commented Jan 23, 2018 at 13:10