I am trying to write a script to track the progress of file change.
I have the following till now:
#!/bin/sh
old=‘ls -l /tmp/file‘
new=‘ls -l /tmp/file‘
while [ "$old" = "$new" ]
do
new=‘ls -l /tmp/file‘
done
echo "The file has been changed"
The above program when run gives the message:
new: command not found
Can someone please help.
Thanks
"$old" -eq "$new"=is string comparison and-eqis numeric comparison.sleep 5into your while loop.