Hey Franklin, no dice on that, but I ended up figuring out a much simpler way to do it. I used:
to replace those lines with colons. I then deleted all newline characters with 'tr'. This left me with one line of addresses delimited by semicolons. I exported it into excel which gave me one row of 1282 addresses. Each address filled one cell on one line. I coped the whole row, and 'Paste Special'ed it into my master document using transpose to make it a column in excel as it could not handle the newlines in the delimited fields. I can export this file to CSV,TXT,XML etc., but is there an easy way to format the addresses so they aren't one line?
I have a perl function in my script that needs to replace an entire line in a file
sub changestate {
my $base = ();
my @base = ();
open(BASE, $file) || die("Could not open file!");
@base=<BASE>;
close (BASE);
foreach $base(@base)
{
if($base =~... (1 Reply)
hey gurus,
my-build1-abc
my-build10-abc
my-build2-abc
my-build22-abc
my-build3-abc
basically i want to numerically sort the entire lines based on the build number. I dont zero pad the numbers because thats "how it is" ;-)
sort -n won't work because it starts from the beginning.
... (10 Replies)
Hello,
I would like to delete all the footnotes in all my htm files. Hence, I have to delete the whole font tag pairs, i.e. deleting everything between the begin/end font tags.
I create a testfile, of which data parts of all four lines are the same except for the number of font tag pairs,... (3 Replies)
Hi everyone
I am new to Unix. I got stuck up by small issue.
I have text file something like this
abc 'xyz' '5'
lmn 'pqr' '7'
i want to replace the abc 'xyz' '5' to abc 'xyz' '6'
but i have a key as 'xyz' based on this key i want to do that.
I am not aware of how to use sed... (7 Replies)
I want to replace one line from my configuration file with the new settings.
The file Name: /etc/httpd/conf/httpd.conf
The following line should be replaced with the line mentioned below.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "\"%h\"... (3 Replies)
Hey Fellas.
I am new to scripting. I have searched through the forums and found a lot of good info, but I can't seem to get any of it to work together. I am trying to find a particular sting in a file, and if the next string matches certain criteria, replace it with a string from a csv... (6 Replies)
Hi,
I need to replace an entire mailx line as follows using sed:
sed -e 's/<line1>/<newline>/g' <filename>
But I am getting comman garbled error since the new line has many special characters. I enclosed allspecial chars in \ but still no use.
Can any one help me?
Please use code... (2 Replies)
Hi All,
I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01.
201401011111
201401022222
201402013333
201402024444
201403015555
201403026666
201404017777
201404028888
201405019999
201405020000
I am trying the... (4 Replies)
I have one requirement to delete all lines from a file if it matches below scenario. File contains three column. Employee Number, Employee Name and Employee ID
Scenario is: delete all line if Employee Number (1st column) contains below
1. Non-numeric Employee Number
2. Employee Number that... (3 Replies)
I have a list of value , and need to replace that in my file.
Eg:
File1
tcname:fail
tcname: Pass
tcname:skipped
File2:
01,02,03
Output:
File 1
01:fail
02: Pass
03:Skipped (8 Replies)