LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-14-2006, 10:38 AM   #1
osio
Member
 
Registered: Jun 2005
Posts: 70

Rep: Reputation: 15
script for display a clock from dated images


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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache can not display Images ! freelinuxcpp Debian 2 07-07-2004 05:42 AM
To display images manjula_rajan Programming 0 03-17-2004 12:52 PM
Display Sound Icon by Clock? wh33t Mandriva 4 11-09-2003 11:36 PM
where and how to display images mlstrnwbie Linux - Newbie 3 09-16-2003 04:18 PM
KDE3 Clock display annoynace MagicTom Linux - General 1 08-23-2003 09:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration