[amsat-bb] perl script to manipulate keps
Andrew Rich
vk4tec at tech-software.net
Thu Jan 30 01:35:51 PST 2014
Enjoy - just keep adding subs for each bird
#!/usr/bin/perl
system("rm /maint/scripts/keps/*.txt");
system("wget http://www.celestrak.com/NORAD/elements/amateur.txt");
system("wget http://www.celestrak.com/NORAD/elements/cubesat.txt");
system("wget http://www.celestrak.com/NORAD/elements/weather.txt");
system("cat /maint/scripts/keps/*.txt > /maint/scripts/keps/total_keps.txt");
open (outfile,"> /maint/scripts/keps/final_keps.txt");
open (keps,"/maint/scripts/keps/total_keps.txt");
while (<keps>)
{
if (m/VO-52/)
{
print outfile $_;
$next_line = <keps>;
print outfile $next_line;
$next_line = <keps>;
print outfile $next_line;
}
}
close (outfile);
More information about the AMSAT-BB
mailing list