开发者

sed + remove spaces between different char with "," seperator between them

param can be one of the following

a,b 开发者_高级运维 , f, d

or

a, b , c, e

or

r , q ,c , d

but we want a,b,c,d without spaces

for example if we get: a , b ,c,d need to change it to a,b,c,d sytax to do that yael

what the best sed syntax to change it


Something like

s/ *, */,/g

I haven't tested it so you may need to fiddle a bit.


Try:

tr -d ' ' < inputfile

or

sed 's/ //g' inputfile
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜