Replace specific text in csv via commandline

前端 未结 3 1593
孤街浪徒
孤街浪徒 2021-01-16 04:38

I have data in csv format that gets output from SQL Server. The data has some NULL and N.A. values written out which makes a column ch

3条回答
  •  孤街浪徒
    2021-01-16 05:33

    This uses a helper batch file called repl.bat from - https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat

    Place repl.bat in the same folder as the batch file or in a folder that is on the path.

    It should be more robust and faster.

    type file.csv |repl "NULL" "-1" |repl "N\.A\." "-2" >newfile.csv
    

提交回复
热议问题