From 704fd926bf8d201e8df510bb29e303ae3f1cee1e Mon Sep 17 00:00:00 2001 From: iProbe Date: Thu, 15 Dec 2022 15:38:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'shell/awk=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E5=88=86=E9=9A=94=E7=AC=A6.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/awk替换分隔符.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 shell/awk替换分隔符.md diff --git a/shell/awk替换分隔符.md b/shell/awk替换分隔符.md new file mode 100644 index 0000000..ae8c597 --- /dev/null +++ b/shell/awk替换分隔符.md @@ -0,0 +1,4 @@ +```bash +# 分隔符由','切换为':',并分隔结果 + cat test.txt | awk -F ',' -v OFS=':' '{printf "%s%s%s%s",$1,OFS,$2," "}'` +``` \ No newline at end of file