gpt4 book ai didi

linux - 如何在特定字符linux之后在行中添加一个空格

转载 作者:太空宇宙 更新时间:2023-11-04 09:22:24 24 4
gpt4 key购买 nike

我有一些文本文件如下。我想在所有逗号字符之后的所有行中添加一个空格字符。我可以在 Linux 中做什么?

J12_1xtc,  10, 10,  1,-10.0600, 43.7866, -1.4100,  51,19
CP0_1xtc, 10, 9, 1,-11.3600, 44.3436, -0.8000, 44, 6
TS2_1xtc, 10, 10, 1,-11.1200, 44.3918, -3.0000, 61,14
BNR_1xtc, 10, 10, 1,-11.1500, 44.4234, -3.9000, 96,22
VAX_1xtc, 10, 10, 1,-10.9400, 44.7986, -3.8300, 137,27
ABC_1xtc, 10, 10, 1,-13.2500, 45.0794, -2.3300, 82,30
KAN_1xtc, 10, 10, 1,-14.7400, 46.2663, -0.3800, 48,17
6M0_1xtc, 10, 10, 1,-16.0100, 46.5524,-11.5400, 48,16
X2A_1xtc, 10, 10, 1,-14.6100, 46.7213, -1.2500, 72,15
1P2_1xtc, 10, 4, 5,-11.8300, 46.7528, -0.7300, 100, 2
6VQ_1xtc, 10, 10, 1,-10.2200, 46.8703, -0.5800, 71,24
1P1_1xtc, 10, 5, 2,-12.0200, 46.9872, -0.0700, 100, 2
HI1_1xtc, 10, 10, 1,-10.1800, 47.6840, -2.5100, 52,17
I21_1xtc, 10, 10, 1,-10.7500, 48.6488, -0.7200, 42, 3
2KC_1xtc, 10, 10, 1,-10.1000, 48.9203, -0.3100, 31, 6
51H_1xtc, 10, 10, 1,-14.7900, 48.9305, -0.1500, 73,25

最佳答案

添加空间:

sed -i 's/,/, /g' fname.txt

关于linux - 如何在特定字符linux之后在行中添加一个空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40416863/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com