How to change the decimal separator with awk/sed?

后端 未结 8 1364
萌比男神i
萌比男神i 2020-12-31 10:40

How to change number format (different decimal separator) from XXXXXX.XXX to XXXXXX,XXX using sed or awk?

8条回答
  •  感动是毒
    2020-12-31 11:36

    Wouldn't this be more accurate as the OP whas talking about numbers.. to make sure it is a leading number before the dot. The document could hold other dots that the OP don't want to substitute.

    sed '/[0-9]\./s/\./,/g'
    

提交回复
热议问题