1

I often multi-thread processes from Terminal by running something like:

sudo etherape &

But I have noticed that I am unable to start multi-threading two processes at the same time by doing something like:

sudo etherape & && sudo wireshark &

And I get this error:

bash: syntax error near unexpected token `&&'

So if this can be done, how can it be done?

7
  • did you tried sudo etherape & sudo wireshark ? May 29, 2015 at 18:53
  • @MarcosRocha: No I had not tried that, but it worked! So can you please turn that into an answer so that I can accept it.
    – user364819
    May 29, 2015 at 18:56
  • sudo has a -b option. Using & can be a problem with password. However it disowns the process. May 29, 2015 at 19:15
  • @richard Note that it is not possible to use shell job control to manipulate background processes started by sudo. Most interactive commands will fail to work properly in background mode.
    – A.B.
    May 29, 2015 at 19:33
  • 1
    You were close...just put the first job in a subshell (sudo etherape &) && sudo wireshark &
    – heemayl
    May 29, 2015 at 19:35

1 Answer 1

3

Please try sudo etherape & sudo wireshark

I hope this answer help you.

You must log in to answer this question.