add some scripts
[dotfiles.git] / scripts / ip.pl
diff --git a/scripts/ip.pl b/scripts/ip.pl
new file mode 100755 (executable)
index 0000000..e4634ac
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+#
+#open IFCONF, 'ifconfig | grep "inet .*broadcast" |' or die 'haha';
+#while(<IFCONF>)
+#{
+##    print $_;
+#}
+#
+#my @cc = split /\s+/, `ifconfig | grep "inet .*broadcast"`;
+#my $aa =  `ifconfig | grep "inet .*broadcast"`;
+#$_ = $aa;
+#print $aa;
+#my $aa =~ m/([0-9]{1,3}\.){3}[0-9]{1,3}/;
+#print $1;
+my $ff = (split / /, `ifconfig | grep "inet .*broadcast"`)[0];
+print  "==||" . $ff . "==\n";
+
+
+