title: executing multiple commands in bash script
body: <p>I have a command that runs in my bash script;</p>
  
  <pre><code>daemon -20 $exec -a  -b $var &amp;
  </code></pre>
  
  <p>I want to use the taskset command with my command multiply;</p>
  
  <pre><code>daemon -20 ; taskset -c 0,1 $exec -a  -b $var &amp;
  </code></pre>
  
  <p>Bu it does not work.What is the problem. When I use taskset with echo for example, It works.</p>
  
  <p>It does not work with daemon.</p>
  
  <p>UPDATE: @chepner I think the third method you suggested.It can be done but i prefer not to extract the proc ids again.I used daemon to run as daemon and set -20 to nice value of process.So if there is a way to use taskset to set CPU affinity and nice commands to set priority together, it will also be good</p>