09-05-2019
I suggest to you, for debugging purposes, that you pipe the output of your script to a file (or to standard out) instead of to the sendmail command.
Do this for both cases (with your awk or sed commands and without) and compare the two outputs.
Post back your results, and do not forgot to use code tags around your code and input/output text.
You will have a much easier time to debug if you look at the results of your script and compare the working and not working results, side by side, instead of just sending the output to sendmail.
That is what I would do.....
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have 2 questions regarding sending mail as attachment.
1. Using mime type (From Oracle tools which reside on UNIX)
When send the mail(txt file) as an attachment, on some servers like Hotmail, the email goes perfect as an attachment. But on some servers like yahoo, get embedded mail which... (2 Replies)
Discussion started by: prasad01
2 Replies
2. UNIX for Dummies Questions & Answers
Is there a way to send an email attachment? So far no where I've looked has given me any leads. (2 Replies)
Discussion started by: Cyro
2 Replies
3. AIX
Hi,
I have .ksh file which internally calls a .sql file. This sql file writes a file with the result. I am using the following command to send email with the result file as attachment
uuencode file.txt file.txt | mail -s "Subject" abc@abc.com.
When i run the .ksh file i get a message you... (5 Replies)
Discussion started by: piyushprabhakar
5 Replies
4. Shell Programming and Scripting
Hi,
I am modifying a file with sed command. i want to make SCORE= blank in the file whereever SCORE=somevalue.
What will *$ do in the below command?
cat $file | sed 's/SCORE=.*$/SCORE=\r/g' > newfile
The last line is also missing in the new file. How to make SCORE='100' to SCORE=... (5 Replies)
Discussion started by: ashok.k
5 Replies
5. UNIX for Advanced & Expert Users
hello,
is it a behavior of or
that "-i" removes unix link .
example :
i create a file "src_file" and link it to "link_file" and then i start "perl -i"
the link is removed. does another option exists to change content of a file without temporary files ?
UNIX-Version: HP-UX and... (2 Replies)
Discussion started by: bora99
2 Replies
6. Solaris
I'm trying to send a .zip file from my unix box to my work email (email client outlook)
The file name that I'm trying to sent is sites.zip and this is how I do it:
uuencode sites.zip | mailx -s "testing" myname@mydomain.com
When I open the .zip, the zip is empty. Looking around the we, I... (17 Replies)
Discussion started by: amb1s1
17 Replies
7. Shell Programming and Scripting
Hi all,
Hoping someone hoping someone might be able to help. i've got the following sed command which i'm using in a bash script that i'm trying to use to insert a new line into an already existing file so i don't have to manually enter it when setting stuff up. the existing script test2/3 are... (3 Replies)
Discussion started by: springs2
3 Replies
8. UNIX for Dummies Questions & Answers
Code :
echo "1,2,3,4"|awk -F "," 'NR==n{$3=a}1' n=1 a=45
Output :
1 2 45 4
Expected :
1,2,45,4 (4 Replies)
Discussion started by: Rajesh_us
4 Replies
9. Shell Programming and Scripting
I have a file in unix, while i do email that file to some one from unix, the attachment file data is displaying in the email. (as body of the email).
but if the file has some special characters , the file is emailing as attachment.
But i need the file as the body in the email if it has special... (1 Reply)
Discussion started by: nani1984
1 Replies
10. Shell Programming and Scripting
datafile:
blah,blah,blah,blah,blah,blah,blah,blah,blah=0_nblah=0-- ,blah,blah,blah
im using the following command to turn the "_n" and "-- " to just a space " " only in the $9th field. meaning, it has to make the changes only in the 9th column/field of the datafile.
awk -F, '{... (1 Reply)
Discussion started by: SkySmart
1 Replies
LEARN ABOUT REDHAT
makemap
MAKEMAP(8) System Manager's Manual MAKEMAP(8)
NAME
makemap - create database maps for sendmail
SYNOPSIS
makemap [-C file] [-N] [-c cachesize] [-d] [-e] [-f] [-l] [-o] [-r] [-s] [-t delim] [-u] [-v] maptype mapnam
DESCRIPTION
Makemap creates the database maps used by the keyed map lookups in sendmail(8). It reads input from the standard input and outputs them to
the indicated mapname.
Depending on how it is compiled, makemap handles up to three different database formats, selected using the maptype parameter. They may be
btree B-Tree format maps. This requires the new Berkeley DB library.
hash Hash format maps. This also requires the Berkeley DB library.
In all cases, makemap reads lines from the standard input consisting of two words separated by white space. The first is the database key,
the second is the value. The value may contain ``%n'' strings to indicate parameter substitution. Literal percents should be doubled
(``%%''). Blank lines and lines beginning with ``#'' are ignored.
Notice: do not use makemap to create the aliases data base, but newaliases which puts a special token into the data base that is required
by sendmail.
If the TrustedUser option is set in the sendmail configuration file and makemap is invoked as root, the generated files will be owned by
the specified TrustedUser.
Flags
-C Use the specified sendmail configuration file for looking up the TrustedUser option.
-N Include the null byte that terminates strings in the map. This must match the -N flag in the sendmail.cf ``K'' line.
-c Use the specified hash and B-Tree cache size.
-d Allow duplicate keys in the map. This is only allowed on B-Tree format maps. If two identical keys are read, they will both be
inserted into the map.
-e Allow empty value (right hand side).
-f Normally all upper case letters in the key are folded to lower case. This flag disables that behaviour. This is intended to mesh
with the -f flag in the K line in sendmail.cf. The value is never case folded.
-l List supported map types.
-o Append to an old file. This allows you to augment an existing file.
-r Allow replacement of existing keys. Normally makemap complains if you repeat a key, and does not do the insert.
-s Ignore safety checks on maps being created. This includes checking for hard or symbolic links in world writable directories.
-t Use the specified delimiter instead of white space.
-u dump (unmap) the content of the database to standard output.
-v Verbosely print what it is doing.
SEE ALSO
sendmail(8), newaliases(1)
HISTORY
The makemap command appeared in 4.4BSD.
$Date: 2001/10/10 03:23:02 $ MAKEMAP(8)