Id like to delete a line from a file using (preferably a single line unix command) if it contains a certain string pattern.
If line contains "abcdef" then delete that line.
Help greatly appreciated. (7 Replies)
Hi Everyone,
I have:
$val="QQ3_1899_CD4".
The output will be:
1899.
I did $val =~ /(\d+)/g; the output is 318994, then i use substr to get those 1899. This is not efficient.
Is any simple way, like just one line can do? Thanks (1 Reply)
Hello, this is probably a simple request but I've been toying with it for a while.
I have a large list of devices and commands that were run with a script, now I have lines such as:
a-router-hostname-C#show ver
I want to print everything up to (and excluding) the # and everything after it... (3 Replies)
Hi all,
i've a string
$DIR=/u/user/NDE/TEST_LOGS/20110622_000005_TEST_11_HD_120/HD/TEST_11_HD_120/hd-12
i need to extract string from 2011.... i.e i need it as 20110622_000005_TEST_11_HD_120 as matched string, and in turn i need to split values 20110622_000005_TEST_11_HD_120 into two.... (6 Replies)
Hi Guys,
I need replace part of string in a file.
for example:
ABC=123
CDE=122
DEF=456
ABC=123
DED=333
ABC=123
I need replace the value after ABC=, highlighted in red. I want to get following result;
ABC=456
CDE=122
DEF=456
ABC=456
DED=333
ABC=456
Anybody can help me this.
... (8 Replies)
Trying to combine strings that are a partial match to another in $1 (usually below it). If a match is found than the $2 value is added to the $2 value of the match and the $3 value is added to the $3 value of the match. I am not sure how to do this and need some expert help. Thank you :).
file
... (2 Replies)
Hi, I have a tab delimited text file like this one. I need to do a partial match of a particular cell and then replace matches with an empty cell. So here is a sample:
Smith FordMustang ChevroletCamaro
Miller FordFiesta
Jones KiaSorrento
Davis ChevroletCamaro
Johnson ToyotaHighlander
I... (4 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT X11R4
pod2html
POD2HTML(1) Perl Programmers Reference Guide POD2HTML(1)NAME
pod2html - convert .pod files to .html files
SYNOPSIS
pod2html --help --htmlroot=<name> --infile=<name> --outfile=<name>
--podpath=<name>:...:<name> --podroot=<name>
--libpods=<name>:...:<name> --recurse --norecurse --verbose
--index --noindex --title=<name>
DESCRIPTION
Converts files from pod format (see perlpod) to HTML format.
ARGUMENTS
pod2html takes the following arguments:
help
--help
Displays the usage message.
htmlroot
--htmlroot=name
Sets the base URL for the HTML files. When cross-references are made, the HTML root is prepended to the URL.
infile
--infile=name
Specify the pod file to convert. Input is taken from STDIN if no infile is specified.
outfile
--outfile=name
Specify the HTML file to create. Output goes to STDOUT if no outfile is specified.
podroot
--podroot=name
Specify the base directory for finding library pods.
podpath
--podpath=name:...:name
Specify which subdirectories of the podroot contain pod files whose HTML converted forms can be linked-to in cross-references.
libpods
--libpods=name:...:name
List of page names (eg, "perlfunc") which contain linkable "=item"s.
netscape
--netscape
Use Netscape HTML directives when applicable.
nonetscape
--nonetscape
Do not use Netscape HTML directives (default).
index
--index
Generate an index at the top of the HTML file (default behaviour).
noindex
--noindex
Do not generate an index at the top of the HTML file.
recurse
--recurse
Recurse into subdirectories specified in podpath (default behaviour).
norecurse
--norecurse
Do not recurse into subdirectories specified in podpath.
title
--title=title
Specify the title of the resulting HTML file.
verbose
--verbose
Display progress messages.
AUTHOR
Tom Christiansen, <tchrist@perl.com>.
BUGS
See Pod::Html for a list of known bugs in the translator.
SEE ALSO
perlpod, Pod::Html
COPYRIGHT
This program is distributed under the Artistic License.
perl v5.8.9 2009-04-13 POD2HTML(1)