while [ -d /proc/ ]; do sleep 1; done; echo "Process finished at $(date +"%F %T")."
Or you can make a bash script:
#!/bin/bash
if [ ! -d /proc/$1 ]; then
echo "Process $1 doesn't exist."
exit 1
fi
while [ -d /proc/$1 ]; do
sleep 1
done
echo "Process $1 finished at $(date +"%F %T")."
No comments:
Post a Comment