Reputation: 13
I have a progress bar that prints dots as it waits for an external program to finish executing. When it does finish, I get an ugly kill message which I want to suppress.
#!/bin/bash
program < input.file.1 > output.1 &
sim='running simulation'
echo -ne $sim >&2
while kill -0 $!; do
echo -n . >&2
sleep 1
done
Expected: running simulation.........
Actual: running simulation........./run_with_dots.1: line 8: kill: (11872) - No such process
Upvotes: 1
Views: 223