Ages ago I put on here some awk scripts to convert between decimal numbers and sexigesimal (i.e. very useful with astronomical catalogues) and I think I've also gone the other way... anyway here is an updated and a more useful bash script todo this, still using awk at the heart of it (this goes from sexigesimal to decimal):
#!/bin/bash
filein=$1
fileout=$2cat $filein | awk '{if ($4>= 0) {h=($1*15)+($2/60)*15+($3/3600)*15; h2=$4+($5/60)+($6/3600); print h,h2,$7,$8,$9}; if ($4< 0) {h=($1*15)+($2/60)*15+($3/3600)*15; h2=$4-($5/60)-($6/3600); print h,h2,$7,$8,$9,$10} }' > $fileout
put this in whateveryoulike.sh and there you go.







