回答編集履歴

1

update

2022/01/27 11:00

投稿

melian
melian

スコア19992

test CHANGED
@@ -2,9 +2,9 @@
2
2
  $ awk --version
3
3
  GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
4
4
 
5
- $ awk -F, '$1=="\"2\""{$4="\"そら\""}{print}' data.csv
5
+ $ awk -F, -vOFS=, '$1=="\"2\""{$4="\"そら\""}{print}' data.csv
6
6
  "id","項目1","項目2","項目3"
7
7
  "1","ねこ","ばなな","やま"
8
- "2" "いぬ" "ぶどう" "そら"
8
+ "2","いぬ","ぶどう","そら"
9
9
  "3","ひと","みかん","まち"
10
10
  ```