I have a script which looks like
If I run this a a foreground process all is well and it duely logs that it is looking every 10 seconds. However I want to run this as a background process so I'm running
and after an initial entry there's nothing written to the log or nohup.out. I've checked and ps shows the loop as running. Can anyone explain this please?
Columb Healy
Code:
#!/bin/ksh
dt_lin()
{
echo $(date +%y%m%d_%H:%M) : $1 >> /home/b40217/testloop.log
}
while [ 1 ]
do
if ssh testbox "ls /tmp/col050201 >/dev/null 2>&1"
then
dt_lin "Found it"
exit
else
dt_lin "looking"
fi
sleep 10
done
Code:
nohup ./testloop &
Columb Healy