 <p>The shell builtin <code>kill</code> or the external one <code>/bin/kill</code> does not take Process ID (or Job ID) via standard input stream. You need to pass them as argument to <code>kill</code>, so:</p> <pre><code>kill -- $(&lt;ff) </code></pre> <p>should do.</p> <p>If you want to kill them one by one and doing something in between, you can create an array with the pids and iterate over them:</p> <pre><code>pids=( $(&lt;file.txt) ) &amp;&amp; for i in "${pids[@]}"; do echo "killing $i"; kill -- "$i"; done </code></pre>