Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-02-2014, 02:54 AM
|
#1
|
Member
Registered: Jul 2011
Posts: 90
Rep: 
|
Why mailx -e command doesn't work
Hello Everybody,
The command mailx -e does not work. I find the command in the man page for mailx. Could anyone suggest me the solution ?
This is the system output when i try to execute the command :
[san@localhost ~]$ mailx -e
mailx: invalid option -- e
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[-- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]
[san@localhost ~]$
Thanks in advance..
Regards
San
Last edited by techie_san778; 02-02-2014 at 03:35 AM.
|
|
|
02-02-2014, 03:26 AM
|
#2
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep: 
|
I cannot find any -e option in man mailx. What exactly are you looking for? I found -E but no -e among the options.
jdk
|
|
|
02-02-2014, 03:38 AM
|
#3
|
Member
Registered: Jul 2011
Posts: 90
Original Poster
Rep: 
|
Hi jdkaye,
Here is an excerpt from the man page..
OPTIONS
The mailx utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2,
Utility Syntax Guidelines.
The following options shall be supported. (Only the -s subject option shall be required on all sys-
tems. The other options are required only on systems supporting the User Portability Utilities
option.)
-e Test for the presence of mail in the system mailbox. The mailx utility shall write nothing and
exit with a successful return code if there is mail to read.
|
|
|
02-02-2014, 04:28 AM
|
#4
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep: 
|
I think we have totally different versions of mailx or maybe it's down to the distro. I have no idea what distro you're using nor what version of mailx you're using. I'm using bsd-mailx Version: 8.1.2-0.20131005cvs-1.
jdk
|
|
|
02-02-2014, 04:33 AM
|
#5
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
Works here.
Your error message isn't valid for the mailx utility. You might check for possible aliases.
What I get for a bad option is:
Code:
$ mailx -z
mailx: illegal option -- z
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
$
|
|
|
02-02-2014, 06:10 AM
|
#6
|
Member
Registered: Jul 2011
Posts: 90
Original Poster
Rep: 
|
@ jdkaye and jpollard,
I am using mailx Mail version 8.1 6/6/93. I believe this is Berkeley Mail. If the -e option is not working then the question is, the man page is referring to which mailx ??.
I also checked whether the command is working in a if [ ] construct inside a script, but again i don't see it work.
Last edited by techie_san778; 02-02-2014 at 06:16 AM.
|
|
|
02-02-2014, 08:21 AM
|
#7
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep: 
|
And I get this:
Code:
$ mailx -z
mailx: invalid option -- 'z'
usage: mailx [-dEIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-s subject] to-addr ...
[-- sendmail-options ...]
mailx [-dEIiNnv] -f [name]
mailx [-dEIiNnv] [-u user]
jdk
|
|
|
02-03-2014, 10:27 PM
|
#8
|
Senior Member
Registered: Mar 2010
Distribution: Slackware
Posts: 2,265
|
mailx -e works for me. -V returns '12.5 7/5/10'. I have the latest version in the Slackware package.
|
|
|
02-04-2014, 03:17 AM
|
#9
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,440
|
Centos 6.5, mailx 12.4 7/29/08 : -e works just fine
|
|
|
All times are GMT -5. The time now is 06:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|