Date: Mon, 13 Sep 2004 17:57:38 -0700 (PDT) From: "Richard Lynch" <ceo@l-i-e.com> To: "Ryan Sommers" <ryans@gamersimpact.com> Cc: freebsd-questions@lists.freebsd.org Subject: Re: Mail from a shell script? Message-ID: <4371.67.167.52.21.1095123458.squirrel@www.l-i-e.com> In-Reply-To: <50164.208.4.77.15.1095096715.squirrel@www2.neuroflux.com> References: <50164.208.4.77.15.1095096715.squirrel@www2.neuroflux.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ryan Sommers wrote: > First problem I ran into. I'm attempting to send the mail via `which > mail`. I first was going to attempt to concatenate the message via > "message=${message}$'\n'<other line>" However, this strips the newlines > out of the variable (both sh and bash). I then tried using the <<string > redirection in bash/sh and same thing happened. Things I would try: Use \\n so that the first pass "eats up" \\ to product \ and then you have \n where you want it. Paste in a literal new-line (control-v/control-m in vi) so that you don't have to rely on \n to work. Also, in "man 5 crontab" there is reference to using %% or somesuch for newlines in mail. I'm not sure if that's a cron thing or a mail thing, but it may be useful. Dislaimer: All of this comes from Linux/PHP experience, and not so much FreeBSD. YMMV. -- Like Music? http://l-i-e.com/artists.htm
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4371.67.167.52.21.1095123458.squirrel>