Sponsored Content
Top Forums Shell Programming and Scripting Problem while displaying(cat) file content inside telnet loop . Post 302961566 by jim mcnamara on Tuesday 1st of December 2015 09:30:32 AM
Old 12-01-2015
With RH6 use mailx -a "filename" to attach a file.

Code:
echo "Fixed text I want to say
More text
More text" > msg.txt
cat errorfilename >>msg.txt
mailx -s 'Subject goes here' -a "msg.txt"   name@mycompany.com

Trying to d use the smtp protocol directly means you have to follow it scupulously - try the above approach first.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep/cat/more -- search in a txt file and display content from a specific "keyword"

Hi, I have a .txt file Sample: ===================== NEXT HOST ===================== AEADBAS001 ip access-list extended BLA_Incoming_Filter ip access-list extended BLA_Outgoing_Filter access-list 1 permit xxxxxxxxxxxxxx access-list 2 permit xxxxxxxxxxxxxx =====================... (4 Replies)
Discussion started by: I-1
4 Replies

2. UNIX for Dummies Questions & Answers

Using a variable inside a file to cat another.

I have a question to do and it's somewhat confusing. It says, and I quote "Create a file called file_1 with three lines of text in it. Create a shell variable called "f_name", assign it the string "file_1". Use the cat command and the variable "f_name" to display the contents of the file... (3 Replies)
Discussion started by: MaestroRage
3 Replies

3. UNIX for Dummies Questions & Answers

problem in reading inside a while loop

I am not able to read inside a while though i get the message "inside read" the cursor doesnt prompt from the console cat file | while read ln_new_engine_dirs do echo "inside $ln_new_engine_dirs" if then read nn echo "inside read" fi done Thanks in advance (3 Replies)
Discussion started by: ssuresh1999
3 Replies

4. Shell Programming and Scripting

file creation inside loop

i=1 while do touch TC$i.txt i=`expr $1 + 1` done echo "files created successfully" What is wrong with code...its running continuosly... (4 Replies)
Discussion started by: villain41
4 Replies

5. Shell Programming and Scripting

how to add string inside the file's content

Hi, How to add string inside the file. In this case adding 63 in the beginning of each line. Thnks. e.g. what is inside the file Mobile Number Portability 9051151234 9051261345 9051393245 9051412345 9051507654 should like this as output: Mobile Number Portability (7 Replies)
Discussion started by: shtobias
7 Replies

6. Shell Programming and Scripting

chmod to stop cat from displaying the file?

Hi, Im struggling with what chmod to change the permission of a file in the current directory named MyFile so the command "cat MyFile" fails to display the file.?? (10 Replies)
Discussion started by: tryintolearn
10 Replies

7. Shell Programming and Scripting

Loop through hosts file - cat /etc/resolv.conf

Hello... I am trying to loop through my hosts file that contains 100+ servers to check or update the nameservers on them... My while loop is breaking after the first server responds... #!/bin/bash while read line; do a=( $(echo $line | tr " " "\n") ) if }" != "" ] && }" != "#" ] &&... (1 Reply)
Discussion started by: CompSCI
1 Replies

8. Shell Programming and Scripting

Problem passing a search pattern to AWK inside a script loop

Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt: I have the following file (users.txt): AU0909,on AU0309,off AU0209,on AU0109,off And this file (userson.txt) AU0909 AU0209 AU0109 AU0309 I just want to set those users on userson.txt to "off" in... (14 Replies)
Discussion started by: quinestor
14 Replies

9. Shell Programming and Scripting

How to save sorted content of a inside the same file?

Hi All, When i use sort Test, here is the output: $ sort Test a b b c d e f g h i But the contents in the file remain unsorted, how to do that? ]$ cat Test g i (6 Replies)
Discussion started by: chandrakanth
6 Replies

10. Shell Programming and Scripting

Creating new file inside a for loop

Hi, I have list of files present in a folder. I want to search for a particular keyword sequentially and create a file which will be later used by some other program. Input files: $ ls a.dsx b.dsx c.dsx Dataline_.txt Dataline.txt loop.sh $ cat *.dsx help tyiis global for i in... (4 Replies)
Discussion started by: mac4rfree
4 Replies
ZMQ_MSG_INIT(3) 						    0MQ Manual							   ZMQ_MSG_INIT(3)

NAME
zmq_msg_init - initialise empty 0MQ message SYNOPSIS
int zmq_msg_init (zmq_msg_t *msg); DESCRIPTION
The zmq_msg_init() function shall initialise the message object referenced by msg to represent an empty message. This function is most useful when called before receiving a message with zmq_recv(). Caution Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions. Caution The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice. RETURN VALUE
The zmq_msg_init() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below. ERRORS
No errors are defined. EXAMPLE
Receiving a message from a socket. zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_recv (socket, &msg, 0); assert (rc == 0); SEE ALSO
zmq_msg_init_size(3) zmq_msg_init_data(3) zmq_msg_close(3) zmq_msg_data(3) zmq_msg_size(3) zmq(7) AUTHORS
This manual page was written by the 0MQ community. 0MQ 2.2.0 04/04/2012 ZMQ_MSG_INIT(3)
All times are GMT -4. The time now is 01:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy