LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 02-02-2014, 02:54 AM   #1
techie_san778
Member
 
Registered: Jul 2011
Posts: 90

Rep: Reputation: Disabled
Exclamation 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.
 
Old 02-02-2014, 03:26 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
Old 02-02-2014, 03:38 AM   #3
techie_san778
Member
 
Registered: Jul 2011
Posts: 90

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-02-2014, 04:28 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
Old 02-02-2014, 04:33 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,724

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283
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
$
 
Old 02-02-2014, 06:10 AM   #6
techie_san778
Member
 
Registered: Jul 2011
Posts: 90

Original Poster
Rep: Reputation: Disabled
@ 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.
 
Old 02-02-2014, 08:21 AM   #7
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
Old 02-03-2014, 10:27 PM   #8
RandomTroll
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 887

Rep: Reputation: 145Reputation: 145
mailx -e works for me. -V returns '12.5 7/5/10'. I have the latest version in the Slackware package.
 
Old 02-04-2014, 03:17 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.3
Posts: 17,524

Rep: Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417Reputation: 2417
Centos 6.5, mailx 12.4 7/29/08 : -e works just fine
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SU command doesn't work properly z99 Linux - Newbie 6 06-08-2011 02:44 PM
why doesn't work this command? baby_ Linux - General 5 12-13-2009 07:16 AM
the ./ command doesn't work Thane Ubuntu 14 09-30-2006 04:22 PM
The command ksh doesn't work Gins Linux - General 18 12-10-2004 12:57 AM
screen command doesn't work (??) planetkaos Linux - Software 3 09-29-2003 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration