Recent Posts

#TIL #linux #sed 첫번째 라인만 교체

less than 1 minute read

$ cat test.csv header1,header2,header3 1,2,3 2,3,1 3,1,2 $ sed -i.bak -e "1s/[^,]/x/g” test.csv $ cat test.csv xxxxxxx,xxxxxxx,xxxxxxx 1,2,3 2,3,1 3,1,2