summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-11-13 03:06:22 -0500
committerdoy <doy@tozt.net>2008-11-13 03:06:22 -0500
commitb7f0e22025bebe7db8f38ff3aed40f83779f66b7 (patch)
tree39e7b555c9ca1e27cb5da26dfc47c1e861af38e9 /bin
parent1ed9e09b29026d4dae2b3d4596ee487184bb88f9 (diff)
downloadconf-b7f0e22025bebe7db8f38ff3aed40f83779f66b7.tar.gz
conf-b7f0e22025bebe7db8f38ff3aed40f83779f66b7.zip
make sure get_ip outputs unix line endings, not dos
Diffstat (limited to 'bin')
-rw-r--r--bin/get_ip3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/get_ip b/bin/get_ip
index c0d3273..879e0cd 100644
--- a/bin/get_ip
+++ b/bin/get_ip
@@ -6,9 +6,10 @@ open my $site, "wget -qO- $page|" or die "Could not get web page";
my $next_line_is_ip = 0;
while (<$site>) {
+ s/[\r\n]+$//;
if ($next_line_is_ip == 1) {
s/ //g;
- print $_;
+ print $_, "\n";
last;
}
$next_line_is_ip = 1 if /Your IP address is/;