You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
262 B

#!/usr/bin/env bash
IFS='
'
if [[ "$#" -ne 1 ]]; then
echo "Error: wrong number of arguments!"
exit 1
fi
bash "$1" &
LOG_FILE="exp.log"
while [[ -n $(jobs | grep -iv done) ]]; do
echo $(date +"%F %T") - $(jobs %1) >> "$LOG_FILE"
sleep 1
done