The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-14-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 2,928
It quite plainly tells you that the -c option does not exist.

On HP-UX, you might be able to find a different version of mailx by enabling the UCB and/or XPG4 subsystems. I can't tell whether those would have a -c option either, though.

If you have śendmail (not necessarily Sendmail, just a command implementing the Sendmail API -- I believe at least both Exim and Postfix offer a /usr/lib/sendmail or /usr/sbin/sendmail command) you can pipe directly to that.

Code:
cat <<HERE /usr/uc4/tmp/PENDINGSD.txt | sendmail -oi -t
Subject: BDC reminder
From: sender@email.com
To: receiver@email.com
Cc: EMAIL_IDS_CC#

HERE
EMAIL_IDS_CC# is not a valid email address but I imagine you are using it as a placeholder for something more useful.

With my luck, your copy of cat is not prepared to read both a here document and a file, but there are workarounds for that as well, of course.
Reply With Quote