Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

mailx (v8.1) on RedHat (ES 5)

mailx (v8.1) on RedHat (ES 5)

New to the Linux forum.

I am installing (building ?) a new RH Linux
server. The mailx version indicates the following: Version 8.1 6/6/93, the version
of RH is ES 5.

I am use to using the 'pipe' command in
mailx (use li(st) at command prompt). In
this version of mailx the man page indicates
that the 'pipe' command exists, however,
when in mailx and attempting to use the
pipe command the following error is displayed:
pi
Unknown command "pi"
pipe
Unknown command "pipe"
Additionally, the list command and resulting
output does not include the pipe command:
& list
Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve,
delete, dp, dt, undelete, unset, mail, mbox, more, page, More, Page,
unread, U, !, copy, chdir, cd, save, source, set, shell, version,
group, write, from, file, folder, folders, ?, z, headers, help, =,
Reply, Respond, reply, respond, edit, echo, quit, list, xit, exit,
size, hold, if, else, endif, alternates, ignore, discard, retain,
saveignore, savediscard, saveretain, core, #, clobber
&
Both the pipe and | are missing from the
list displayed commands>

Note the excerpt from the man mailx command:
Pipe Message
Synopsis:
pi[pe] [[msglist] command]| [[msglist] command]

Pipe the messages through the given command by invoking the command interpreter specified by SHELL with two arguments:
-c and command. (See also sh -c.) The application shall ensure that the command is given as a single argument. Quot-
ing, described previously, can be used to accomplish this. If no arguments are given, the current message shall be
piped through the command specified by the value of the cmd variable. If the page variable is set, a shall
be inserted after each message.

Any help, insights and comments would be greatly appreciated....Ron Widlewski




3 REPLIES
Steven E. Protter
Exalted Contributor

Re: mailx (v8.1) on RedHat (ES 5)

Shalom,

Could you provide the syntax of the command you are using.

mailx was not present in RHEL 4.x and the syntax needed might not be what you expect from say HP-UX

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: mailx (v8.1) on RedHat (ES 5)

Shalom,
The syntax is listed above:

type in the mailx command (there must be
read or unread mail)

RH Linux:

--> mailx
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/widlewsk": 2 messages 2 new
>N 1 widlewsk@localhost.l Thu Mar 19 13:20 142/3765
N 2 widlewsk@localhost.l Thu Mar 19 13:21 142/3765

& list

Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve,
delete, dp, dt, undelete, unset, mail, mbox, more, page, More, Page,
unread, U, !, copy, chdir, cd, save, source, set, shell, version,
group, write, from, file, folder, folders, ?, z, headers, help, =,
Reply, Respond, reply, respond, edit, echo, quit, list, xit, exit,
size, hold, if, else, endif, alternates, ignore, discard, retain,
saveignore, savediscard, saveretain, core, #, clobber

& pipe
Unknown command: "pipe"

& set

PAGER more
append
ask
askcc
asksub
autoprint
cmd lp
crt
dot
hold
interactive
keepsave
metoo
save
screen 50
showto
&
============================================
Note HPUX:

--> mailx
mailx Revision: 1.179.214.2 Date: 98/12/01 01:29:55 Type ? for help.
"/var/mail/widlewsk": 1 message 1 new
>N 1 widlewsk@orion.thi Thu Mar 19 13:30 119/3144

? list

Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve,
delete, dp, dt, undelete, unset, mail, mbox, !, copy, Copy, chdir, cd,
save, Save, source, set, shell, version, group, write, from, followup,
Followup, file, folder, folders, ?, z, headers, help, =, Reply,
Respond, reply, respond, edit, echo, quit, list, xit, exit, size, hold,
if, else, endif, alternates, ignore, discard, retain, #, pipe, |,
unalias

? pipe

Pipe to: "pr -o6 -t|lp -dhp47 -onb -olpi8 -o12 -obold"
request id is hp47-5160 (standard input)
"pr -o6 -t|lp -dhp47 -onb -olpi8 -o12 -obold" 119/3144

? set

append
askcc
asksub
autoprint
cmd="pr -o6 -t|lp -dhp47 -onb -olpi8 -o12 -obold"
crt="21"
dot
encoding="8bit"
header
hold
keepsave
metoo
save
screen="50"
showto
sign="R.Widlewski"
?

========================================

Please note, my issue is that the RH man
mailx includes the pipe and "|" as available
"commands" from within mailx. This problem
is that while the man page describes the use
and the cmd variable, while in mailx the
pipe and "|" commands are not available.

Ron
dirk dierickx
Honored Contributor

Re: mailx (v8.1) on RedHat (ES 5)

perhaps the man page is not up to date, i suggest you report this to RH for them to fix.