I have a tab delimited input file. Some numeric field values have a minus sign in the midst of the value such as 000-45.123
. I need the -
to be on left side like this instead: -00045.123
So if tab delimited input file contains: (spaces are tabs)
ABC 000-45.123 0-765.43 DEF 00-54 XYZ
then I want result to be
ABC -00045.123 -0765.43 DEF -0054 XYZ
All the number values with an embedded “-“ begin with 1 or more zeros and no other characters.
Note: I don't have these options available: sed -r or sed -E