separate fields by comma using bash

前端 未结 8 1418
滥情空心
滥情空心 2021-01-25 01:07

How do I place commas between fields?

Input data

12123 \'QA test case 1\' \'QA environment\'   
12234 \'UAT test case 1\' \'UAT environment\'  
         


        
8条回答
  •  说谎
    说谎 (楼主)
    2021-01-25 01:51

    $ sed "s/ '/,&/g" file
    12123, 'QA test case 1', 'QA environment'
    12234, 'UAT test case 1', 'UAT environment'
    

提交回复
热议问题