Re: Command substitution into argument to convert

"Michael F. Stemper" <[email protected]> Mon, 13 Jun 2022 15:29:45 -0500
Newsgroups alt.comp.lang.shell.unix.bourne-bash
Organization A noiseless patient Spider
Message-ID <[email protected]>
On 13/06/2022 14.28, Michael F. Stemper wrote:
> I'm trying to time-stamp image files as they're downloaded. The
> following works fine:
> 
> $ convert -pointsize 20 -fill black -draw 'text 10,20 "06/13 14:13"' RadarMap.png Stamped.png
> 
> However, hard-coding the time stamp would make it worthless. What
> I really want to use is the output of:
> 
> $ date +"%m/%d %H:%M"
> 
> But no matter how I try to incorporate that into the command, I
> get errors.


One other data point. If I try using back-quotes for the
command substitution:

$ convert -pointsize 20 -fill black -draw 'text 10,20 `date +"%m/%d %H:%M"`' RadarMap.png Stamped.png

no error message is issued, but the text that's placed on
the image is:

   date +"%m/%d %H:%M"

-- 
Michael F. Stemper
Indians scattered on dawn's highway bleeding;
Ghosts crowd the young child's fragile eggshell mind.