My input files are having header/body/footer. The first three digits finds whether the data is header/body/footer. For example,
From the above file, there is a date of birth in body (=020). I want to remove/substitute the dateofbirth with spaces. Like, 19750426 is the date of birth but want to substiute as spaces "1#7#0#2#". Want to do this same in all records in the file. Can you please tell me how to do this in shell script?
A small change in my previous post. Instead of substitue the spaces, need to fill every 2nd character as # in the Date of Birth field.
---------- Post updated at 10:25 AM ---------- Previous update was at 06:00 AM ----------
dr.house! Thanks for your coding. But I tried and it is still giving the same input file content as result
Last edited by nvkuriseti; 05-07-2010 at 07:17 AM..
Reason: Code tags, PLEASE!
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)
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 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
hobbitweb
HOBBITWEB(5) File Formats Manual HOBBITWEB(5)NAME
Xymon web page headers, footers and forms.
DESCRIPTION
The Xymon webpages are somewhat customizable, by modifying the header- and footer-templates found in the ~xymon/server/web/ directory.
There are usually two or more files for a webpage: A template_header file which is the header for this webpage, and a template_footer file
which is the footer. Webpages where entry forms are used have a template_form file which is the data-entry form.
With the exception of the bulletin files, the header files are inserted into the HTML code at the very beginning and the footer files are
inserted at the bottom.
The following templates are available:
bulletin
A bulletin_header and bulletin_footer is not shipped with Xymon, but if they exist then the content of these files will be inserted
in all HTML documents generated by Xymon. The "bulletin_header" contents will appear after the normal header for the webpage, and
the "bulletin_footer" will appear just before the normal footer for the webpage. These files can be used to post important informa-
tion about the Xymon system, e.g. to notify users of current operational or monitoring problems.
acknowledge
Header, footer and form template for the Xymon acknowledge alert webpage generated by bb-ack.cgi(1)
bb Header and footer for the Xymon Main view webpages, generated by bbgen(1)
bb2 Header and footer for the Xymon All non-green view webpage, generated by bbgen(1)
bbnk Header and footer for the now deprecated BBNK webpage, generated by bbgen. You should use the newer hobbit-nkview.cgi(1) utility
instead, which uses the hobbitnk templates.
bbrep Header and footer for the Xymon Main view availability report webpages, generated by bbgen(1) when running in availability report
mode.
bbsnap Header and footer for the Xymon Main view snapshot webpages, generated by bbgen(1) when running in snapshot report mode.
bbsnap2
Header and footer for the Xymon All non-green view snapshot webpage, generated by bbgen(1) when running in snapshot report mode.
columndoc
Header and footer for the Xymon Column documentation webpages, generated by the bb-csvinfo.cgi(1) utility in the default Xymon con-
figuration.
confreport
Header and footer for the Xymon Configuration report webpage, generated by the hobbit-confreport.cgi(1) utility. Note that there are
also "confreport_front" and "confreport_back" templates, these are inserted into the generated report before the hostlist, and
before the column documentation, respectively.
event Header, footer and form for the Xymon Eventlog report, generated by hobbit-eventlog.cgi(1)
findhost
Header, footer and form for the Xymon Find host webpage, generated by bb-findhost.cgi(1)
graphs Header and footer for the Xymon Graph details webpages, generated by hobbitgraph.cgi(1)
hist Header and footer for the Xymon History webpage, generated by bb-hist.cgi(1)
histlog
Header and footer for the Xymon Historical status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a historical
(non-current) status log.
hobbitnk
Header and footer for the Xymon Critical Systems view webpage, generated by hobbit-nkview.cgi(1)
hostsvc
Header and footer for the Xymon Status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a current status log.
info Header and footer for the Xymon Info column webpage, generated by hobbitsvc.cgi(1) utility when used to show the host configuration
page.
maintact
Header and footer for the Xymon webpage, generated by hobbit-enadis.cgi(1) utility when using the Enable/Disable "preview" mode.
maint Header, footer and form for the Xymon Enable/disable webpage, generated by hobbit-enadis.cgi(1)
nkack Form show on the status-log webpage when viewed from the "Critical Systems" overview. This form is used to acknowledge a critical
status by the operators monitoring the Critical Systems view.
nkedit Header, footer and form for the Critical Systems Editor, the hobbit-nkedit.cgi(1) utility.
replog Header and footer for the Xymon Report status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a status log for
an availability report.
report Header, footer and forms for selecting a pre-generated Availability Report. Handled by the bb-datepage.cgi(1) utility.
snapshot
Header and footer for the Xymon Snapshot report selection webpage, generated by bb-snapshot.cgi(1)SEE ALSO bbgen(1), hobbitsvc.cgi(1), xymon(7)Xymon Version 4.2.3: 4 Feb 2009 HOBBITWEB(5)