Skip to main content
2 of 2
added 44 characters in body
Anthon
  • 81.4k
  • 42
  • 174
  • 228

I (nearly) always quote everything to "echo", so I would do the above like:

#!/bin/bash
echo "./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &"
./yowsup/yowsup-cli demos --s $1 "$2" -c yowsup/config &

The difference with @muru solution is, that there the original echo command is run "in the background" - here it's echoing to the screen in the foreground, but run as a background command. (@muru's also doesn't show the ampersand at the end of the command.)