Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Oct 2017 11:58:57 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Scripting problem
Message-ID:  <88D321A2CCD516AEF39DE8C3@Pauls-MacBook-Pro.local>
In-Reply-To: <20171008100017.30ab5987.freebsd@edvax.de>
References:  <7AB396F429EEB6890100F082@Pauls-MacBook-Pro.local> <VI1PR02MB1200B33C1F59A223B84E9153F6770@VI1PR02MB1200.eurprd02.prod.outlook.com> <8C8E7D66788801594EC0FC4C@Pauls-MacBook-Pro.local> <20171008100017.30ab5987.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--On October 8, 2017 at 10:00:17 AM +0200 Polytropon <freebsd@edvax.de> 
wrote:

> On Sun, 08 Oct 2017 01:14:04 -0500, Paul Schmehl wrote:
>> I guess I should have pointed out that I'm sending mail on localhost, so
>> there's no auth involved. I'm using mutt because mailx doesn't appear to
>> have the ability to attach files.
>
> You can attach files with classic mail / mailx, but you'd have
> to create the headers yourself and maybe use b64encode, so your
> solution really looks more comfortable.
>
>
>
>> I solved the problem by using a one word subject. It's weird that Mutt
>> is  somehow parsing the words in the subject and using them as
>> recipients.
>
> As I said, mutt doesn't do that. Always keep in mind that space
> (or whitespace in general) is the option delimiter in sh and bash.
> So when you issue
>
> 	mutt -s Foo Bar Baz [...]
>
> the -s parameter will be "Foo" only (without the quotes). Then
> mutt will receive the parameters "Bar" and "Baz" which it treats
> as addresses (because there is no option switch infront of them,
> so they have to be addresses, see "man mutt" for synopsis).
>
> To deal with this problem, make the shell submit the whole string
> as _one_ parameter:
>
> 	mutt -s "Foo Bar Baz" [...]
>
> Now -s will receive "Foo Bar Baz" (without the quotes). Use double
> quotes because you want shell expansion / variable evaluation.
>
> It's not mutt's fault. :-)

I've considered myself a journeyman in FreeBSD, having used it for about 
twenty years now. I guess I need to go back to being an apprentice. I 
obviously don't understand how the shell works yet.

Oh well, you're never too old to learn.

Paul Schmehl, Retired
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88D321A2CCD516AEF39DE8C3>