Reputation: 4346
I saw following command
echo "haha" | mutt -s "test" -- $myemail
it will send an email with subject "test" and content "haha" to my email address. However, I can't figure what is -- for. I check both manpage and try a couple of experiments. But it's still puzzling for me.
Anyone has some clue?
Thanks
Upvotes: 2
Views: 346
Reputation: 17670
--
in many applications says "there are no more command line options, treat everything past this point as raw text on the command line."
In your example, you can probably omit and wrap the email in quotes (which also may not be strictly necessary).
echo "haha" | mutt -s "test" "[email protected]"
The --
helps if there's something odd expected afterwards, for example:
echo "haha" | mult -s "test" -- [email protected]
without --
the parser library might consider -foo
to be a command line option, but with it, it considers it just some word on the command line.
Upvotes: 3