forked from adolfopa/miscutils
17 lines
281 B
Bash
Executable File
17 lines
281 B
Bash
Executable File
#!/bin/sh
|
|
[ $# -eq 1 ] && echo "usage: $0 command ..." && exit 64
|
|
tmp1=$(mktemp $0.XXXXXXXXXX)
|
|
tmp2=$(mktemp $0.XXXXXXXXXX)
|
|
trap "rm $tmp1 $tmp2; exit 0" 1 2 15
|
|
while "$@" >$tmp2
|
|
do
|
|
if ! diff $tmp1 $tmp2
|
|
then
|
|
cp $tmp2 $tmp1
|
|
else
|
|
echo -n "."
|
|
fi
|
|
sleep 2
|
|
done
|
|
rm $tmp1 $tmp2
|