[amsat-bb] Re: Keps
Paul Williamson
kb5mu at amsat.org
Fri Jun 17 00:08:25 PDT 2011
At 11:46 PM -0500 6/16/11, George Henry wrote:
>I used to use a program called NASAWASH. You set up a "mysats" file that
>specifies which birds you are interested in, and then you can set up a batch
>file that will automatically parse whatever input file you specify (like
>nasa.all) and output the filtered results to the filename and location that
>you specified.
I'm the author of NASAWASH. It doesn't have that feature, though it would be a good starting point for a C programmer wishing to create such a program. If somebody added that feature already, I'm not aware of it (and the version on the AMSAT web/ftp site doesn't include it). Perhaps you're thinking of some other program you used in conjunction with NASAWASH?
If you have (or install yourself) a reasonably standard "grep" program (such as the one at http://gnuwin32.sourceforge.net/packages/grep.htm ) you can write a simple batch file script like this, assuming that you've already downloaded the elements from your favorite source to a file named inputfile:
nasawash inputfile nasabare.txt
grep -A 2 AO-51 nasabare.txt >mynasa.txt
grep -A 2 FO-29 nasabare.txt >>mynasa.txt
grep -A 2 AO-07 nasabare.txt >>mynasa.txt
grep -A 2 SO-67 nasabare.txt >>mynasa.txt
The "-A 2" tells grep to output the matching line and two lines following. The NASAWASH step is optional if the file you download contains nothing but the element sets.
73 -Paul
kb5mu at amsat.org
More information about the AMSAT-BB
mailing list