Rewrite a file of sexigecimal strings (1 string per line) and apply checks that the output values are standard colon-delimited strings.
% sexprep.sh list.RA > new_file arg1 - name of ASCII input file with sexigecimal lines % cat list.RA 14:34:12.27 14:27:07.61 14 27 06.98 14h55m17.62777s 14h07m07.17s +14:49:45.5488488 -14:49:46.0334 08:45:32 08:45:33.23222 -14:27:15.14 % cat new_file 14:34:12.27 14:27:07.61 14:27:06.98 14:55:17.62777 14:07:07.17 +14:49:45.5488488 -14:49:46.0334 08:45:32 08:45:33.23222 -14:27:15.14The corrected string are written to standard out, but in a script application they are usually directed to a file (in the case above we direct to file "new_file"). The output strings should be terminated properly, and any signs attached to the input strings should be preserved.
I usually use this routine to prepare Ra,Dec values for the sex2float (sex2float.sh and sex2float.py) routines. However, it is also very useful for processing Time strings:
% cat aaa 1:11:21.26 23:46:28.08 12h16m54.548s 12h16m54.548s % sexprep.sh aaa 1:11:21.26 23:46:28.08 12:16:54.548 12:16:54.548