1

I read a solution about running 2 commands at the same time from command line by spawning another process. Say I want to run commandA and commandB then what I have to write in script is:

commandA &
commandB

But the problem is, when I run the script, it gives me output in terminal some number (probably PID I think, because if I call kill <that_number> it stopped the commandA process) like this:

[ 1 ] 2592
# after some time program running
[ 1 ] + 2592 done

My question is:

  1. What is it that number exactly?
  2. How do I disable that output number? Tried to redirect stdout and stderr to dev null doesn't seem to work...
  • 2
    Did you look at stackoverflow.com/questions/11097761/… – tk421 Sep 30 '18 at 0:44
  • @tk421 whoaa thanks so much, sorry that I asked quest that have already been asked. I cannot find it via google cause google seems cant read & as syntax... – user312781 Sep 30 '18 at 0:47
  • 1
    No worries, most times search won't give the right answer unless you know the right terminology. For future reference it's called bash job control. – tk421 Sep 30 '18 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.