Sponsored Content
Top Forums Shell Programming and Scripting Concatenating File and String for Sendmail Post 302400855 by alister on Thursday 4th of March 2010 09:51:28 AM
Old 03-04-2010
Hi, high5

Code:
echo "$MyVariable" | cat /tmp/errormessage.txt - | sendmail mai@domain.com

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

concatenating static string to records in data file

I just need to add a static ID to each output record so the users will be able to tell which group records in combined flatfiles come from I have the static ID in a bourne variable. I tried awk '{print "${GroupID}" $0}' infile > outfile But I ended up with the string ${GroupID} instead of... (5 Replies)
Discussion started by: gillbates
5 Replies

2. UNIX for Dummies Questions & Answers

concatenating string and variable

how to concatenate a string and variable like a=rahul and i want to put it into another variable 'b' as "rahul_prasath" i dont want to use another variable for "_prasath" how to do it? (1 Reply)
Discussion started by: rolex.mp
1 Replies

3. Shell Programming and Scripting

Concatenating values in a File

Hi All, I have a ',' delimited file and i would like concatenate a new value at a specific column. Example :- xXXX,XYZ,20071005,ABC,DEF,123 xXXX,XYZ,20071005,ABC,DEF,123 xXXX,XYZ,20071005,ABC,DEF,123 The output that i want is xXXX,XYZ,20071005001,ABC,DEF,123... (7 Replies)
Discussion started by: amitkhiare
7 Replies

4. Shell Programming and Scripting

Concatenating the two lines in a file

hi My requirement is i have a file with some records like this file name ::xyz a=1 b=100,200 ,300,400 ,500,600 c=700,800 d=900 i want to change my file a=1 b=100,200,300,400 c=700,800 d=900 if record starts with " , " that line should fallows the previous line.please give... (6 Replies)
Discussion started by: srivsn
6 Replies

5. Programming

Concatenating array of strings into one string separated by spaces

Hi, Well as the title says, I have an array of strings (delimited by null). The length of the array is variable and length of each string is variable as well. What I need is one huge string with the original strings in the array separated by spaces. For example is an array is such that array... (12 Replies)
Discussion started by: newhere
12 Replies

6. Shell Programming and Scripting

Concatenating string with numbers

Hi, I want to display the string value with number value. I dont know how to display. Can anyone help me. This is my code export A=${file_name} echo $a $b $sum | awk '{ printf "%011.f,%014.f,%014.f\n", $1,$2,$3}' >> ${MRR_OUTPUT} the out put shold be ${A}, $a, $b filename,... (2 Replies)
Discussion started by: easterraj
2 Replies

7. Shell Programming and Scripting

Concatenating and appending string based on specific pattern match

Input #GEO-1-type-1-fwd-Initial 890 1519 OPKHIJEFVTEFVHIJEFVOPKHIJTOPKEFVHIJTEFVOPKOPKHIJHIJHIJTTOPKHIJHIJEFVEFVOPKHIJOPKHIJOPKEFVEFVOPKHIJHIJEFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV #GEO-1-type-2-fwd-Terminal 1572 2030... (7 Replies)
Discussion started by: patrick87
7 Replies

8. Shell Programming and Scripting

de concatenating a string

I have a variable var=string1:string2:string3 I want to get the string de-concatenated and put it as var1=string1 var2=string2 var3=string3 Thanks in advance. ---------- Post updated at 02:18 PM ---------- Previous update was at 01:45 PM ---------- I got the solution as below:... (2 Replies)
Discussion started by: Deepak62828r
2 Replies

9. Shell Programming and Scripting

Concatenating(??) shell variable with string

Dear Users, I am writing a for loop in shell (BASH), and am struggling with a very specific detail: SU_DATA=/home/........./su/ for(blah blah blah) { a=1001 b=1002 suop2 $SU_DATA/$a_clean.su $SU_DATA/$b_clean.su op=sum > W1.su } Here, it looks like the variables are... (1 Reply)
Discussion started by: martm
1 Replies

10. UNIX for Beginners Questions & Answers

Concatenating sequence length to another file

I want to add the sequence length of File_1.fa and File _2.fa to form the form the fifth column in File_1_pos.txt and File_2_poa.txt respectively using awk and bash. Can anyone help me? Thanks Get sequence length of each file File_1.fa File_2.fa Add the sequence length to be the third... (6 Replies)
Discussion started by: Ibk
6 Replies
MAILER.CONF(5)						      BSD File Formats Manual						    MAILER.CONF(5)

NAME
mailer.conf -- configuration file for mailwrapper(8) DESCRIPTION
The file /etc/mailer.conf contains a series of lines of the form name program [arguments ...] The first word of each line is the name of a program invoking mailwrapper(8). (For example, on a typical system /usr/sbin/sendmail would be a symbolic link to mailwrapper(8), as would newaliases(1) and mailq(1). Thus, name might be ``sendmail'' or ``newaliases'' etc.) The second word of each line is the name of the program to actually execute when the first name is invoked. The further arguments, if any, are passed to the program, followed by the arguments mailwrapper(8) was called with. The file may also contain comment lines, denoted by a '#' mark in the first column of any line. The default mailer is postfix(1), which will also start by default (unless specifically disabled via an rc.conf(5) setting) so that locally generated mail can be delivered, if the ``sendmail'' setting in /etc/mailer.conf is set to ``/usr/libexec/postfix/sendmail''. FILES
/etc/mailer.conf EXAMPLES
This example shows how to set up mailer.conf to invoke the postfix(1) program: sendmail /usr/libexec/postfix/sendmail mailq /usr/libexec/postfix/sendmail newaliases /usr/libexec/postfix/sendmail This example shows the use of the mini-sendmail package from pkgsrc in place of postfix(1): # Send outgoing mail to a smart relay using mini-sendmail sendmail /usr/pkg/sbin/mini-sendmail -srelayhost send-mail /usr/pkg/sbin/mini-sendmail -srelayhost Note the use of additional arguments. SEE ALSO
mail(1), mailq(1), newaliases(1), postfix(1), mailwrapper(8) pkgsrc/mail/sendmail, pkgsrc/mail/mini_sendmail HISTORY
mailer.conf appeared in NetBSD 1.4. AUTHORS
Perry E. Metzger <perry@piermont.com> BUGS
The entire reason this program exists is a crock. Instead, a command for how to submit mail should be standardized, and all the ``behave differently if invoked with a different name'' behavior of things like mailq(1) should go away. BSD
April 10, 2010 BSD
All times are GMT -4. The time now is 02:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy