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
  • 3
    oh, and the "oneliner": /bin/sh -c 'echo $$>/tmp/my.pid && exec program args' & Commented Nov 24, 2010 at 14:28
  • 1
    To properly preserve internal whitespace in the arguments, you should use exec "$@" instead of exec $*. Technically what you need to preserve is not whitespace but occurrences of the characters in the IFS shell parameter (which defaults to space, tab, and newline). Commented Nov 25, 2010 at 3:53
  • point taken. :) Commented Nov 25, 2010 at 7:54
  • Thank you, I did not know $$ parameter. It can be very useful. Commented Nov 27, 2010 at 12:12