blob: 9e33bed2af7a842f3d771bd615701f68974d1b14 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/usr/bin/env perl
use FileHandle;
# ***************************************************
# add_tle.pl
#
# This Perl module will read in the latest five orbital elements
# from the file five.tle (which was created by get_tle.pl) and
# add any new orbital elements to the file FUSE.TLE. The file
# FUSE.TLE is in descending order (i.e. the most recent elements
# are first). In order to prepend the new TLE onto the old list
# I found it was easiest to store everything in a temporary file
# TEMP.TLE and rewrite FUSE.TLE.
#
# Author: Ed Murphy
#
# History: Written July 27, 1999
# 11/21/06 wvd Add process ID ($$) to name of
# batch file.
#
# ***************************************************
# Define the file names. old_maintle_filename is not actually opened,
# but is used in a system call at the end of the program.
if (@ARGV == 0) {
print "You must enter the rootname of the observation.\n";
print "Exiting.\n";
} else {
$batch_filename = $ARGV[0] . $$."_idl.bat";
# Open the output batch file.
open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
print BAT_OUTFILE "cf_plot_rate3,'" . $ARGV[0] . "'\n";
print BAT_OUTFILE "exit\n";
close (BAT_OUTFILE);
system("idl $batch_filename > /dev/null");
system("rm $batch_filename");
}
### end of Perl script
|