I wrote a tiny script to create image files with the date command
Quote:
$ sh now2jpg &
$ display -update 4 /tmp/jpg
|
Quote:
#!/bin/bash
# now2jpg
# 14/01/2006
# display -update detects changes in an image every number of seconds
echo "Usage in the background:" `basename $0` "& and display -update 4 /tmp/now.jpg"
while [ 1 ]
do
now=`/bin/date '+%Y%m%d%H%M%S'`
convert -size 110x25 xc:white /tmp/base.png
# the variable $now can be rendered as an image with the -draw option
convert -draw "text 10,15 '$now'" /tmp/base.png /tmp/now.jpg
sleep 2
done
|
How can I insert the shell command 'display -update 4 /tmp/now.jpg' in the loop so the scripts doesn't need two prompt entries?