Send traps from text file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Send traps from text file
# 1  
Old 04-16-2010
Question Send traps from text file

Hello everyone!

I have a text file with the next content:

2010-04-15 15:21:15 Minor 15605325 1531 Alarm name = IAD Equipment In Service location=iad01.tecnac.camino.illapel, Module=26

and I want send traps with the informationn of this file.

How I can do this?

Many thanks!
# 2  
Old 04-16-2010
Could you tell us what you mean by traps? Thanks.
# 3  
Old 04-16-2010
Are you talking about "snmptrap"? You could probably do something like:

while read line; do snmptrap {args here} "$line"; done < input.txt

js.
# 4  
Old 04-16-2010
Quote:
Originally Posted by jsmoriss
Are you talking about "snmptrap"? You could probably do something like:

while read line; do snmptrap {args here} "$line"; done < input.txt

js.
Exactly...I will try this
Thanks man!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Manipulate condition to send mail based on output text in file

Hi All, I have a working script as below. echo "Files loaded with $(cat /var/tmp/script.X1.out)" | mail -s "Files loaded with return code" mailid This script takes the output from script.X1.out file and appends the text "Files loaded with return code" and sends the email. Now what I want... (5 Replies)
Discussion started by: midhun3108
5 Replies

2. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies

3. Shell Programming and Scripting

Read a file, add some text and send an email

Hi, If I am asking this question, you must have already figured out , that I am new to Unix, so here it goes I was trying to read a file, add some user defined content to it and send out an email , I did find out a way to achieve this, but looking at the code, it looks a bit crude to me, can... (3 Replies)
Discussion started by: karthikbhuvana
3 Replies

4. Shell Programming and Scripting

send text mail to windows

Hi I have the following 'atd' batch script to send mail to a windows (outlook) system: .... .... LESSOPEN=\|/usr/bin/lesspipe.sh\ %s; export LESSOPEN G_BROKEN_FILENAMES=1; export G_BROKEN_FILENAMES cd /root/bin || { echo 'Execution directory inaccessible' >&2 exit 1 }... (3 Replies)
Discussion started by: AdminLew
3 Replies

5. UNIX for Advanced & Expert Users

shell script to send separate mails to different users from a text file

Hi Friends, Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file. text file contains the no. of records like: Code: giridhar 224285 847333 giridhar276@gmail.com ramana 84849 33884... (0 Replies)
Discussion started by: giridhar276
0 Replies

6. UNIX for Advanced & Expert Users

Parse text file values and send those files as an attachment

We have these files in say \home\abcd\dm Summary.txt log_SI-100.lst log_SI-101.lst log_SI-106.lst The contents of Summary.txt is as below ./log_SI-100.lst:Error detected, rollbacking ./log_SI-101.lst:Error detected, rollbacking ./log_SI-106.lst:Error detected, rollbacking Now i... (5 Replies)
Discussion started by: depakjan
5 Replies

7. Shell Programming and Scripting

Send a mail to IDs listed in a text file

I have a list of mail ids in text file and want a ksh script that reads this text file and sends a mail to all mail ids with same subject line and content. I am using UX-HP machine and KSH. Thanks for help in advance! (5 Replies)
Discussion started by: Sriranga
5 Replies

8. Solaris

is the MASF agent send traps on IPMP failure?

who is responsible for sending traps if in the IPMP group one nic is failed? is it something that we need to configure manualy or it's automatic configured when u install the masf agent? (solaris 10, on Netra210, masf 1.5.3) (0 Replies)
Discussion started by: shaybery
0 Replies

9. UNIX for Dummies Questions & Answers

Parse Text file and send mails

Please help. I have a text file which looks something like this aaa@abc.com, c:FilePath\Eaaa.txt bbb@abc.com, c:FilePath\Ebbb.txt ccc@abc.com, c:FilePath\Eccc.txt ddd@abc.com, c:FilePath\Eddd.txt...so on I want to write a shell script which will pick up the first field 'aaa@abc.com' and... (12 Replies)
Discussion started by: Amruta Pitkar
12 Replies

10. UNIX for Dummies Questions & Answers

Send text file to mail

I have a utility that opens a telnet session and allows me to execute commands through a script. The utility allows me to output to a text file whatever is outputted to screen. This utility runs from a DOS prompt in Windows 95/98, NT or 2000. How can I mail text file this to a certain user. I... (2 Replies)
Discussion started by: petrosi
2 Replies
Login or Register to Ask a Question