mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-27 22:22:53 +00:00
14 lines
255 B
PHP
14 lines
255 B
PHP
|
#!/usr/bin/php
|
||
|
<?php
|
||
|
|
||
|
$filename= $argv[1];
|
||
|
$outputfile = $argv[2];
|
||
|
$f = fopen($outputfile, 'w');
|
||
|
|
||
|
foreach(file($filename) as $row) {
|
||
|
if (strlen(trim($row)) > 0 and trim($row)[0] != "#") {
|
||
|
fwrite($f, trim($row) . ' 0.0.0.0' . PHP_EOL);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fclose($f);
|