echo 'hello:w,morning' | awk 'BEGIN{FS="[:,]";OPS=" "}{print $1,$2,$3}'
hello w morning
複製代碼
name="paxi"
echo "is" | awk -F' ' -v name="$name" '{print name" " $0}'
paxi is
複製代碼
sudo iu paxi << EOF
< mkdir a
<exit
<EOF
複製代碼
grep -v -f A.txt B.csv
//A.txt中的每一行都會被當作一個pattern
複製代碼
cat a.txt
a
b
cat b.txt
a
c
複製代碼
diff a.txt b.txt
2c2
< b
---
> c
複製代碼
comm a.txt b.txt
a
b
c
複製代碼
comm -12 a.txt b.txt
a
兩個文件中都有的vim
vimdiff a.txt b.txt
複製代碼