Bash scripting new line interpretation
Hello and mtia.
basically I am calling a system command from an asterisk dialplan. Code:
System(/bin/echo -e "From: ${CALLERID(all)} \n To: Test" | /usr/bin/mutt -a /var/spool/asterisk/fax/1182976018.452.tif -s "FAX - From ${CALLERID(all)}" "${FAXTOEMAILADDRESS}") Code:
System(/bin/echo -e "From: ${CALLERID(all)}" \n "To: Test" | /usr/bin/mutt -a /var/spool/asterisk/fax/1182976018.452.tif -s "FAX - From ${CALLERID(all)}" "${FAXTOEMAILADDRESS}") From: <phone numbers> n To: Test Never a new line. Any ideas? mtia |
Escape the backslash like \\\? What shows if you output to tmpfile for testing purposes? Else is this really a Bash problem?
|
Newlines do appear fine in testing, I had made sure to test that before I posted. They do not in the above example, however that is now a moot point as a one line body is fine in the sending of the mail.
Thanks for the response anyways unSpawn. |
Ok, Np.....
|
Quote:
|
All times are GMT -5. The time now is 06:08 AM. |