title: Kill and restart multiple processes that fit a certain pattern
body: <p>I am trying write a shell script that will kill all processes that are running that match a certain pattern, then restart them. I can display the processes with:</p>
  
  <pre><code>ps -ef|grep ws_sched_600.sh|grep -v grep|sort -k 10
  </code></pre>
  
  <p>Which gives a list of the relevent processes:</p>
  
  <pre><code>user 2220258       1   0 16:53:12      -  0:01 /bin/ksh /../../../../../ws_sched_600.sh EDW02_env
  user 5562418       1   0 16:54:55      -  0:01 /bin/ksh /../../../../../ws_sched_600.sh EDW03_env
  user 2916598       1   0 16:55:00      -  0:01 /bin/ksh /../../../../../ws_sched_600.sh EDW04_env
  </code></pre>
  
  <p>But I am not too sure about how to pass the process ids to kill?</p>