Re: Command substitution into argument to convert
"Michael F. Stemper" <[email protected]> Wed, 15 Jun 2022 07:55:18 -0500
| Newsgroups | alt.comp.lang.shell.unix.bourne-bash |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On 14/06/2022 18.38, Lewis wrote: > In message <[email protected]> Lewis <[email protected]> wrote: >> $ MYDATE=$(date +"%m/%d %H:%M");convert -pointsize 20 -fill black -draw "text 10,20 \"$MYDATE\"" RadarMap.png Stamped.png > > This works: > > MYDATE=$(date +"%m/%d %H:%M");convert -pointsize 20 -fill white -draw "text 10,20 \"$MYDATE\"" image.jpg image-date.jpg > > I expect this also works, but did not try: > convert -pointsize 20 -fill white -draw "text 10,20 \"$(date +"%m/%d %H:%M")\"" image.jpg image-date.jpg Those both work. Thanks. I had tried various permutations of single and double quotes, but never thought of escaping them. -- Michael F. Stemper This email is to be read by its intended recipient only. Any other party reading is required by the EULA to send me $500.00.