Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Just to add to Anubhava's excellent answerAnubhava's excellent answer:

You could use {} as well, like this:

su root -c "{ tcpdump -i wlan0 -s 1500 -w CCCCCC & }; ls -lh"

{} is a little more efficient than () in that it doesn't create a sub shell. {} does need a space after { and a ; before } unless we have an & already.

Just to add to Anubhava's excellent answer:

You could use {} as well, like this:

su root -c "{ tcpdump -i wlan0 -s 1500 -w CCCCCC & }; ls -lh"

{} is a little more efficient than () in that it doesn't create a sub shell. {} does need a space after { and a ; before } unless we have an & already.

Just to add to Anubhava's excellent answer:

You could use {} as well, like this:

su root -c "{ tcpdump -i wlan0 -s 1500 -w CCCCCC & }; ls -lh"

{} is a little more efficient than () in that it doesn't create a sub shell. {} does need a space after { and a ; before } unless we have an & already.

Source Link
codeforester
  • 816
  • 2
  • 10
  • 23

Just to add to Anubhava's excellent answer:

You could use {} as well, like this:

su root -c "{ tcpdump -i wlan0 -s 1500 -w CCCCCC & }; ls -lh"

{} is a little more efficient than () in that it doesn't create a sub shell. {} does need a space after { and a ; before } unless we have an & already.