[Remind-Fans] escape char trouble

Davide Alberani alberanid at mail.com
Sat Oct 6 06:07:29 EDT 2001


I've a long list of birthdays, so I wrote a function that - given
a name and the year of birth - sends me an email with a remind (and
prints the entry in the calendar).

My function is:

FSET _mailMeBDate(name, bdate) "echo -e '%b " + name + " compie " + \
     (year(trigdate())-bdate) + " anni.'" + " | mail -s 'Compleanno " + \
     name + "' " + myemail + " # %" + Quote + "Compleanno " + name + "%" +
     Quote

And is called with:
REM ONCE 16 October ++7 RUN [_mailMeBDate("Paola", 1971)]

Some translations:
  "compie"    = "celebrates"
  "anni"      = "years"
  "compleanno = "birthday"
  myemail is a variable with my email address.
  Quote is CHAR(34) (")

The net result is the execution of something like that:
  echo -e 'fra 2 giorni Paola compie 30 anni.' | mail -s 'Compleanno Paola' davide at mypersonalhost.com # %"Compleanno Paola%"


When remind is compiled for the Italian language it works ok; but
compiling for English "fra %d giorni" is translated in "in %d days' time"
and the ' char causes the shell to complain:
  sh: -c: line 1: unexpected EOF while looking for matching `''
  sh: -c: line 2: syntax error: unexpected end of file

Is there a neat way to escape chars like ' that are in the remind's
output?


Thanks, and pardon my English,
-- 
(=---= alberanid at mail.com =-------------= PGP KeyID: 0x465BFD47 =--=)
 )                        Davide Alberani                          (
(=--= http://digilander.iol.it/alberanid/ =-= ICQ UIN: 83641305 =--=)



More information about the Remind-fans mailing list