Hi folks,
I need to search and replace specific text in a file and replace it. I have a text file that does not have any newlines or carriage returns. All newlines have been removed. Here is what I need to do.
Find the exact string “DH” (quotes included) and replace it with \n”DH” (basically... (6 Replies)
Is there a way to use the sed command to
1) search a specified pattern
2) in the line where that pattern is found, replace from character N to character N+4 with a new 4-character string.
Thks in advance! (5 Replies)
hi,
im new for sed, anyone can help me to these in sed command
my output file.txt
"aaa",a1,bbb
"ddd",a1,ccc
"eee",a1,www
need to change a1, to "a1","
output i need
"aaa","a1","bbb
"ddd","a1","ccc
"eee","a1","www
thanks in advance
fsp (2 Replies)
Can someone help me in solving the problem below.
I have the following two files
template_file
------------
...other data..
...other data..
FILE_NAME=
...other data..
...other data..
list_file
----------
<file_name1>
<file_name2>
<file_name3>
I need to produce another output... (3 Replies)
Hello -
I have a very large file in which a certain numbers are repeated. I find that using vi to edit the entire file is useless.
How should i use sed to find a replace such as this text:
To replace: 145.D25.D558
With: 215.22.45.DW
I tried this command:
sed... (4 Replies)
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
Hi everyone,
basically I am been cleaning data by using simple sed commands
So what i have below has been working for me.
sed 's/="//g' trade.csv > tradeb.csv
sed 's/"//g' tradeb.csv > trade2.csv
but now i don't want to remove all the quotes just the ones if i encounter this ... (1 Reply)
Hi All
I have a simple text file and I want to be able to replace any alpha character and comma combination with any other symbol of my choice
here is the text file I want to replace:
pear
apple
ban,ana
grape
",g1234,"
te,st1
here is how it should look afterwards:
pear... (4 Replies)
Hi guys, thanks for accepting me in your forum .. I am trying to clean some hacked PHP files using SSH .. I am using this command:
find . -type f -print0 | xargs -0 sed -i '/god_mod/d'
<?php ... (3 Replies)
Net::DNS::RR::APL(3) User Contributed Perl Documentation Net::DNS::RR::APL(3)NAME
Net::DNS::RR::APL - DNS APL resource record
SYNOPSIS
use Net::DNS;
$rr = new Net::DNS::RR('name IN APL aplist');
DESCRIPTION
DNS Address Prefix List (APL) record
METHODS
The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.
Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or
other unpredictable behaviour.
aplist
@aplist = $rr->aplist;
@aplist = $rr->aplist( '1:192.168.32.0/21', '!1:192.168.38.0/28' );
@aplist = $rr->aplist( '1:224.0.0.0/4', '2:FF00:0:0:0:0:0:0:0/8' );
@aplist = $rr->aplist( negate => 1,
family => 1,
address => '192.168.38.0',
prefix => 28,
);
Ordered, possibly empty, list of address prefix items. Additional items, if present, are appended to the existing list with neither prefix
aggregation nor reordering.
Net::DNS::RR::APL::Item
Each element of the prefix list is a Net::DNS::RR::APL::Item object which is inextricably bound to the APL record which created it.
negate
$rr->negate(0);
$rr->negate(1);
if ( $rr->negate ) {
...
}
Boolean attribute indicating the prefix to be an address range exclusion.
family
$family = $rr->family;
Address family discriminant.
prefix
$prefix = $rr->prefix;
Number of bits comprising the address prefix.
address
$address = $object->address;
Address portion of the prefix list item.
string
$string = $object->string;
Returns the prefix list item in the form required in zone files.
COPYRIGHT
Copyright (c)2008 Olaf Kolkman, NLnet Labs.
Portions Copyright (c)2011 Dick Franks.
Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.
All rights reserved.
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl, Net::DNS, Net::DNS::RR, RFC3123
perl v5.18.2 2014-01-16 Net::DNS::RR::APL(3)