如何更改使用awk小数点分隔/ sed的? [英] How to change the decimal separator with awk/sed?

查看:231
本文介绍了如何更改使用awk小数点分隔/ sed的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 XXXXXX.XXX 数字格式(不同的小数点分隔符)改变使用 XXXXXX,XXX SED AWK

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

推荐答案

这是不是可以更准确的OP whas谈论数字..以确保它是点之前领先的数字。该文件可以容纳的OP不愿意调换其它点。

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'

这篇关于如何更改使用awk小数点分隔/ sed的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆