I need to replace the line containing "STAGE_DB" with the line
"STAGE_DB $DB # database that contains the table being loaded ($workingDB)"
Here $DB is passed during the runtime.
How can I do this?
Thanks,
Kousikan (2 Replies)
New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.
What I have thus far:
sed -e... (6 Replies)
Hi,
I am looking for any script which can do the following.
have to read a pattern from fileA and copy it to fileB.
fileA:
...
...
Header
...
...
..p1
...
...
fileB:
....
....
Header (3 Replies)
I have a pattern
username:x:32005:32006::/usr/local/user:/bin/bash
I need to match the line containing username and replace /bin/bash with /usr/local/my/bin/noshell
So it becomes
username:x:32005:32006::/usr/local/user:/usr/local/my/bin/noshell (7 Replies)
I have a file with multiple lines like this:
<junk><PATTERN><junk><PATTERN><junk>
<junk><PATTERN><junk><PATTERN><junk><PATTERN><junk>
Note that
1. There might be variable number occurrences of PATTERN in a line.
2. <> are just placeholders, they do not form part of the pattern.
I need... (4 Replies)
Sed replace using same pattern repeating multiple times in a line
I have text like below in a file:
I am trying to replace the above line to following
How can I acheive this?
I am able to do it if the occurrence is for 1 time:
But If I try like below
I am getting like this:
I have to... (4 Replies)
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
LEARN ABOUT DEBIAN
xmltv::validategrabber
ValidateGrabber(3pm) User Contributed Perl Documentation ValidateGrabber(3pm)NAME
XMLTV::ValidateGrabber - Validates an XMLTV grabber
DESCRIPTION
Utility library that validates that a grabber properly implements the capabilities described at
http://wiki.xmltv.org/index.php/XmltvCapabilities
The ValidateGrabber call first asks the grabber which capabilities it claims to support and then validates that it actually does support
these capabilities.
EXPORTED FUNCTIONS
All these functions are exported on demand.
ConfigureGrabber
ConfigureGrabber( "./tv_grab_new", "./tv_grab_new.conf" )
ValidateGrabber
Run the validation for a grabber.
ValidateGrabber( "tv_grab_new", "./tv_grab_new", "./tv_grab_new.conf",
"/tmp/new_", "./blib/share", 0 )
ValidateGrabber takes the following parameters:
o a short name for the grabber. This is only used when printing error messages.
o the command to run the grabber.
o the name of a configuration-file for the grabber.
o a file-prefix that is added to all output-files.
o a path to a directory with metadata for the grabber. This path is passed to the grabber via the --share option if the grabber
supports the capability 'share'. undef if no --share parameter shall be used.
o a boolean specifying if the --cache parameter shall be used for grabbers that support the 'cache' capability.
ValidateGrabber returns a list of errors that it found with the grabber. Each error takes the form of a keyword:
noparamcheck
The grabber accepts any parameter without returning an error-code.
noversion
The grabber returns an error when run with --version.
nodescription
The grabber returns an error when run with --description.
nocapabilities
The grabber returns an error when run with --capabilities.
nobaseline
The grabber does not list 'baseline' as one of its supported capabilities.
nomanualconfig
The grabber does not list 'manualconfig' as one of its supported capabilities.
noconfigurationfile
The specified configuration-file does not exist.
graberror
The grabber returned with an error-code when asked to grab data.
notquiet
The grabber printed something to STDERR even though the --quiet option was used.
outputdiffers
The grabber produced different output when called with different combinations of --output and --quiet.
caterror
tv_cat returned an error-code when we asked it to process the output from the grabber.
sorterror
tv_sort found errors in the data generated by the grabber. Probably overlapping programmes.
notadditive
grabbing data for tomorrow first and then for the day after tomorrow and concatenating them does not yield the same result as
grabbing the data for tomorrow and the day after tomorrow at once.
Additionally, the list of errors will contain error keywords from XMLTV::ValidateFile if the xmltv-file generated by the grabber was
not valid.
If no errors are found, an empty list is returned.
COPYRIGHT
Copyright (C) 2006 Mattias Holmlund.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
perl v5.14.2 2011-01-26 ValidateGrabber(3pm)