Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Adding one string at the beginning of each line in a file Post 302384716 by praveen_b744 on Wednesday 6th of January 2010 06:37:47 AM
Old 01-06-2010
Thanks Sank.
Thanks is what I want.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding a character in the beginning of every line in a .dat file

How can i add a character(#) in the beginning of every line in a .dat file (2 Replies)
Discussion started by: Cool Coder
2 Replies

2. Shell Programming and Scripting

input a line at the beginning of every file in a directory?

if need to input a word or anything at the beginning of every file in a directory. how do i accomplish this? say the file is named hyperten. how do i make hyperten the first line of every file in a given directory? thanks (6 Replies)
Discussion started by: Terrible
6 Replies

3. UNIX for Dummies Questions & Answers

write new line at the beginning of an existing file

I was trying to find out the easiest way to write new line to the beginning of an exisiting file. I am using KSH. (5 Replies)
Discussion started by: sailussr
5 Replies

4. Shell Programming and Scripting

[string processing]Adding new line in file

I have a report file which somewhere has a lines starting with word ".sub" I have a new variable named $new. What i am trying to do is insert the content of $new just before the occurrence of ".sub" in the report file. How can I do that? (11 Replies)
Discussion started by: animesharma
11 Replies

5. UNIX for Dummies Questions & Answers

rename file by adding a name in beginning

about 200 files with names as 11_0.pdb 11_60.pdb 12_12.pdb 14_180.pdb are there in my library...I need to rename all of them by addinf File in front of them as: File11_0.pdb File11_60.pdb File12_12.pdb File14_180.pdb I checked many threads but it seems i get even more confused..i... (1 Reply)
Discussion started by: kanikasharma
1 Replies

6. Shell Programming and Scripting

Append file name to the beginning of each line

I want to append file names at the beginning of a line for each row file content abc.txt.gz 123|654|987 bcd.txt.gz 876|trf|kjh I want a single output file with below format abc.txt.gz|123|654|987 bcd.txt.gz|876|trf|kjh This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies

7. Shell Programming and Scripting

Adding a text in the beginning of a line

Hi, I am doing something like below: cat file1>file3and cat file2>>file3 I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record. cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies

8. Shell Programming and Scripting

How to add one line in the beginning of the file?

Hi gurus, I need add one new line in the begining of current file. current file abc cde add xyz output file newline abc cde add xyz (6 Replies)
Discussion started by: ken6503
6 Replies

9. Shell Programming and Scripting

Put a string to the beginning of a file without a linefeed

Hello, I need to put the following string to the beginning of a file - but it should not create a newline at the end of the string. So, the file I have is a compressed one - with gzip. And I would like to add an ASCII-String to the beginning of the file. The string has a length of 69... (5 Replies)
Discussion started by: API
5 Replies

10. Shell Programming and Scripting

Adding test to beginning and end of list in a file

Hi all and apologies for the silly question, but I've searched and I can't get this right. I have a list of email addresses in a file that I need to blacklist (spam). the list is quite long and I would need to script a small routine so that I can get the following for each line in the file: db... (4 Replies)
Discussion started by: bm555
4 Replies
TORRUS_ACTION_NOTIFY(7) 					      torrus						   TORRUS_ACTION_NOTIFY(7)

NAME
action_notify - Generic notification handler for Torrus monitor SYNOPSIS
<action name="notify"> <param name="action-type" value="exec" /> <param name="command"> $TORRUS_BIN/action_notify </param> <param name="launch-when" value="set" /> </action> DESCRIPTION
This program is designed for usage from a monitor action only. It takes the arguments from environment variables, as described in action- type "exec" in Torrus XML Configuration Guide. The handler reads its configuration from <notify-siteconfig.pl>, a small Perl file which defines the notification paths for various conditions. Example: %Torrus::Notify::programs = ( 'mailto' => '$TORRUS_BIN/action_printemail | /usr/bin/mail $ARG1', 'page' => '/usr/bin/echo $TORRUS_NODEPATH:$TORRUS_MONITOR ' . '>> /tmp/monitor.$ARG1.log' ); %Torrus::Notify::policies = ( 'CUST_A' => { 'match' => sub { $ENV{'TORRUS_P_notify_policy'} eq 'A' }, 'severity' => { '3' => [ 'mailto:aaa@domain.com', 'mailto:bbb@domain.com' ], '5' => [ 'page:1234', 'mailto:boss@domain.com' ] } } ); In this example, we define two message handlers: e-mail sender and a dummy replacement for a pager program. Then we define the notification policies. For the customer A, we define the policy so that the parameter "notify-policy" should match the name "A". The parameter is defined in the datasource tree and marks only those leaves that belong to this customer. Then, depending on the monitor severity, different notification paths are defined. For severity values higher or equal 3, aaa@domain.com and bbb@domain.com will receive the email notifications, and for severity higher than or equal 5 all recipients will receive the notification. The "match" argument is a Perl subroutine, and can depend on various parameters, such as time of day or day of the week, the tree name, and so on. FILES
/etc/torrus/conf/notify-siteconfig.pl Notification policies configuration SEE ALSO
torrus(8) NOTES
See more documentation at Torrus home page: http://torrus.org AUTHOR
Stanislav Sinyagin <ssinyagin@yahoo.com> torrus 2.03 2013-07-26 TORRUS_ACTION_NOTIFY(7)
All times are GMT -4. The time now is 03:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy