#!/usr/bin/perl -w # Many DRAO programs mistakenly replaced Qsst or Usst with Q or U. This is a # hack to easily fix up those files, assuming you know what you're doing. use DRAORed; my $use = q { Use: qusstize file1 [ file2 file3 ... ] }; unless(@ARGV > 0) { die $use; } foreach my $filn (@ARGV) { @retvals = fileindex($filn); $filind = $retvals[0]; my %origdefn = readdef($filind); if ($origdefn{POLARIZATION} eq "Q" || $origdefn{POLARIZATION} eq "U") { $origdefn{POLARIZATION} = "$origdefn{POLARIZATION}sst"; if($origdefn{LASTCHANGEDBY} ne "inspolcorr"){ print "Warning! $filn ($filind) last changed by "; print "$origdefn{LASTCHANGEDBY}, not inspolcorr!\n"; } writedef($filind, $filind, %origdefn); } else { print "Left $filn ($filind) as $origdefn{POLARIZATION}.\n"; } }