When I try to use the CLI mail, I get the following error. What's wrong?
Welcome to Darwin!
% mail root
Subject: test
test
.
EOT
% /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory
Do I just need to change the... (1 Reply)
I'm trying to write a menu script in ksh to allow a user to find his/her mail path.
Display the mail file path")
print -n "Mail File Path: " $MAIL
It's not working although it works when I'm simply doing it from the command line. Also, I'm using the same formula to find the shell path... (2 Replies)
folks,
I wrote a script like follow for sending notification email, but the problem is cannot pass the multiple words to the subject line, any help:
=======================================
send_msg () {
send_email $1
exit 1;
}
send_email () {
mail -s $1 $mail_address << MAIL... (2 Replies)
Hi,
I have a small script that outputs to a text file. I need to e-mail the contents of the text file to a mail alias. However, I cannot seem to get the script to print the 'subject', my script just leaves it blank. Has anybody any ideas what is wrong?
if
then
(echo "\nHere is the report... (3 Replies)
Hi All,
I have to write a script to send mail, in that i have to dynamically
add the recepient in TO and my cc is a common one.
For all mails my cc recepients are same. Only problem with TO recepient.
Please i am looking for your inputs. (1 Reply)
I have a file with the following values:
File name à a.log (bulk file with 100+ lines with the similar format)
aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii|
aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii|
aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii|... (3 Replies)
Hi,
I need to create one KSH which will send mail to set of recipients using "mailx" command like below.
mailx -s "Test mail" "test@yahoo.com, test@gmail.com" <$output.txt
The recipients are in different domains (like yahoo, gmail, etc.).
My requirement is, if any mail is undelivered,... (1 Reply)
Hello
I am trying to send an email when a .KSH script is run on an AIX Machine.
This email will only include a subject line that is made up of variables from within the script, and is as follows:
CURRENT_DATE=`date +%Y%m%d`
TIME=`date`
ADMIN="myname@domain.com"
date
block ()
{
... (4 Replies)
Hi Team,
I'm trying to send HTML Report from email using the below script (Using ksh 88 version)
#!/bin/ksh
set -x
SUB="Test Email"
Mail_Body="This is for testing"
Send_Mail_HTML()
{
(
echo "FROM: abcd@test.com"
echo "To: abcd@test.com"
echo "Subject:... (2 Replies)
I want to search a file if it contains special strings and if yes, the records found should be mailed.
I can either do it with a temporary file:
/usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@mycomp.com < /tmp/tempfile... or by running the grep... (10 Replies)
Discussion started by: Cochise
10 Replies
LEARN ABOUT SUNOS
echo
echo(1B) SunOS/BSD Compatibility Package Commands echo(1B)NAME
echo - echo arguments to standard output
SYNOPSIS
/usr/ucb/echo [-n] [argument]
DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output.
echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi-
ronment variables.
For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows:
o echo your current-working-directory's full pathname
o pipe the output through tr to translate the path's embedded slash-characters into space-characters
o pipe that output through wc -w for a count of the names in your path.
example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
See tr(1) and wc(1) for their functionality.
The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if
the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape
characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's
echo() also understands a as the audible bell character; however, these commands do not have an -n option.
OPTIONS -n Do not add the NEWLINE to the output.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases.
SunOS 5.10 3 Aug 1994 echo(1B)