[amsat-bb] Re: perl script to manipulate keps

Andrew Rich vk4tec at tech-software.net
Thu Jan 30 01:50:49 PST 2014


Slight mod 

system("wget http://www.celestrak.com/NORAD/elements/amateur.txt -O /maint/scripts/keps/amateur.txt");
system("wget http://www.celestrak.com/NORAD/elements/cubesat.txt -O /maint/scripts/keps/cubesat.txt");
system("wget http://www.celestrak.com/NORAD/elements/weather.txt -O /maint/scripts/keps/weather.txt");
  ----- Original Message ----- 
  From: Andrew Rich 
  To: amsat-bb at AMSAT.Org 
  Sent: Thursday, January 30, 2014 7:35 PM
  Subject: perl script to manipulate keps


  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