Solved — Errors with afraid-dyndns in Goddard (Fedora 13)

Since I updated to the Fedora 13, I was getting error from the Dynamic DNS client for afraid. I was not getting enough time to fix this, so finally I decided to fix this in the night itself 🙂

On running


I was getting the error:

Entity: line 100: parser error : Opening and ending tag mismatch: br line 99 and div

Entity: line 118: parser error : Entity \’copy\’ not defined
© 2010 DomainTools, LLC All rights reserved.
Entity: line 121: parser error : AttValue: \” or \’ expected
/link/?id=4668\’;} return(true);\”>\"\"\"\"

So here is the solution :

On further investigation I found that the issue was not with the afraid server but with getting the external IP. So I decided to use my own site to get the IP. And changed the following in the afraid-dyndns file:

Comment out the following code:

#$xml = get(\”\”);
#die \”Failed fetching IP address!\” unless $xml;
#echo (\”Got IP:\”. $xml);

#$o = XMLin($xml);
#$extip = $o->{proxy_ip}; # external address

And add the following line just below the just commented lines:

$extip = get(\”\”);
$extip =~ s/\\n//;

This change be sufficient to get you going again.. 🙂


prepend to a file with sponge from moreutils

A few weeks I wrote about a tool, which helps you easily prepend to a file. I submitted prepend to moreutils and Joey was kind enough to point out this could be done with `sponge\’.? sponge reads standard input and when done, writes it to a file:
Probably the most general …


Perl script to create csv files with a pattern – Generic script.

I was having a really bad day and needed a quick solution to create some csv files. And this I needed to do for multiple data kinds and patterns, so I created this small script to do the job for me…

#Number of rows required in the output.

$rows = 100;

#The config and the output file

open (CF_FILE, \”<Config.test\”);
open (OUT_FILE, \”>test.csv\”);

# No need to change anything below this.

$count = 0 ;

#read a line from config file of the type

#also any line starting with # is treated as comment.

# startingvalue incrementvalue

# so you can have any number of fields here and all of them you would be joined with , to write to the output file.
while (<CF_FILE>)
/^#/ && next;
@vars = split(/ /);
$arr[$count] = $vars[0];
$arr_inc[$count] = $vars[1];
for ($i=0; $i < $rows; $i++)
$line = join (\”,\”,@arr);
print OUT_FILE \”$line\\n\”;
for ($j=0; $j < $count; $j++)
$arr[$j] += $arr_inc[$j];