The bash manual have this to say about the -d argument to read:
-d delim
The first character of delim is used to terminate the input
line, rather than newline.
This is the problematic code in question:
read -d "" line < "$pidfile"
for i in $line; do
if [ -z "$(echo $i | sed 's/[0-9]//g')" -a -d "/proc/$i" ]; then
pids="$i $pids"
fi
done
Could this be rewritten using IFS, or is a complete rewrite needed?
I'm not sure what the special use of read is trying to solve. Why not
use 'for i in `cat $pidfile`'?
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]