#!/bin/csh -bf # # C-shell script : CRZ2RNX # (frontend of CRX2RNX) # 1996.12.19 created by HATANAKA, Y. # e-mail: hata@gsi-mc.go.jp # # Modifications: # 1998/01/14 whp Changed path to CRX2RNX # #-------------------------------------------------------------------- if($#argv < 1) then more << EOF CRZ2RNX is a C-shell script to recover RINEX files from Compact RINEX files. Usage : CRZ2RNX CRINEX_files [compressed CRINEX/RINEX] Wildcard can be used. Recovered RINEX files are created into current directory. compressed RINEX/CRINEX --> CRINEX --> RINEX ????????.??m.Z --> ????????.??m ????????.??n.Z --> ????????.??n ????????.??o.Z --> ????????.??o ????????.??d.Z --> ????????.??d --> ????????.??o ????????.??d --> ????????.??o EOF exit endif #-------------------------------------------------------------------- #set PROGRAM = /goa/local/gp_dir/HatanakaCompression/unix/bin/CRX2RNX_LINUX2.0.33 set PROGRAM = /goa/local/gp_dir/HatanakaCompression/unix/bin/CRX2RNX_Linux unset noclobber foreach file ($argv[*]) set file2 = $file:t if( $file2:e == 'Z') set file2 = $file2:r set body = $file2:r set extension = $file2:e set yy = `echo $extension | cut -c1-2` if($file =~ *.??m.Z) then compress $file else if($file =~ *.??n.Z) then compress $file else if($file =~ *.??o.Z) then compress $file else if($file =~ *.??d.Z) then zcat $file | $PROGRAM - > $body.$yy'o' ######## The following is an example of error handling. ######## You may activate or custamize it as you like. # if($status == 1) then # rm $body.$yy'o' # continue # endif else if($file =~ *.??d) then cat $file | $PROGRAM - > $body.$yy'o' ######## see above # if($status == 1) then # rm $body.$yy'o' # continue # endif else endif end