shell命令:需要把连续两个或两个以上空格替换为一个
需要把连续两个或两个以上空格替换为一个命令如下,那里写的不对?sed's/\+/\/g'test.txt>test1.txt内容如下test.txt:heisarathe...
需要把连续两个或两个以上空格替换为一个 命令如下,那里写的不对?
sed 's/\ +/\ /g' test.txt > test1.txt
内容如下
test.txt: he is a rat he is in a rut
the food is Rotten
I like root beer
whe is in a rut
1256313asas11
12312213
546aaaaa
111
habchhabc
hhhabcd
hhhhhh 展开
sed 's/\ +/\ /g' test.txt > test1.txt
内容如下
test.txt: he is a rat he is in a rut
the food is Rotten
I like root beer
whe is in a rut
1256313asas11
12312213
546aaaaa
111
habchhabc
hhhabcd
hhhhhh 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询