添加 'shell/awk替换分隔符.md'

This commit is contained in:
iProbe 2022-12-15 15:38:48 +08:00
parent 08c386fc67
commit 704fd926bf

View file

@ -0,0 +1,4 @@
```bash
# 分隔符由','切换为':',并分隔结果
cat test.txt | awk -F ',' -v OFS=':' '{printf "%s%s%s%s",$1,OFS,$2," "}'`
```