Hi All,
I spent the whole morning trying to create a shell script ( using "sed" command ) that looks for a value in a directory and its sub directory than changes it with another value but couldn't find the way :(
a first step, allowded me to trace all the files that contain it and even... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
7. Post Here to Contact Site Administrators and Moderators
Majority of the questions are pertaining file/string parsing w.r.t
sed
or
awk
It would be nice to have these two as their own sub category under shell-programming-scripting which can avoid lot of duplicate posts. (1 Reply)
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Hi Experts,
I have a string with colon delimited, want 2nd colon to be changed to a pipe.
data:
101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:
I am trying with sed, but can change only 1 occurance:
echo "101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:" | sed 's/:/|/2'... (5 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
LEARN ABOUT DEBIAN
torrus_action_printemail
TORRUS_ACTION_PRINTEMAIL(7) torrus TORRUS_ACTION_PRINTEMAIL(7)NAME
action_printemail - A script for sending email from monitor action.
SYNOPSIS
<action name="report-email">
<param name="action-type" value="exec" />
<param name="command">
$TORRUS_BIN/action_printemail | mail alarms@example.com
</param>
<param name="launch-when" value="set, clear" />
</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. In addition, some values may be supplied via command-line arguments (see section OPTIONS
below).
Site-specific variables must be specified in the file email-siteconfig.pl. Default values are installed by the first run of "make
install". Subsequent runs of "make install" do not override this file.
OPTIONS --url=GRAPHER-URL
Sets the URL of the grapher CGI script.
--template=TEMPLATE-FILE
Uses given file as a template. The template file must reside in /usr/share/torrus/templates directory. It must be a Template-toolkit
file, with the following variables defined:
tree Tree name
token Leaf token
path Leaf path
url URL for browsing this leaf
ncomment This leaf comment
npcomment Leaf's parent comment
event Event type
monitor Monitor name
mcomment Monitor comment
timestamp Time and date of the event
env(VAR) Environment variable VAR
FILES
/etc/torrus/conf/email-siteconfig.pl
Torrus site email configuration script.
/usr/share/torrus/templates
/etc/torrus/templates
Torrus template directories.
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_PRINTEMAIL(7)