"${filename...}"
例如:把所有 mp4 檔 rename 成 avi:
for file in *.mp4;do mv "$file" "${file/.mp4/.avi}";done
像這個 ${file/.mp4/.avi} 就是把 $file 中 .mp4 換成 .avi,其中的兩個 "/" 符號就是 replace。
ref:
"${filename...}"
for file in *.mp4;do mv "$file" "${file/.mp4/.avi}";done
sed '/match string/d' file > out
sed '/match string/d' infile > out
sed '/stringA/d' -e '/stringB/d' -e '/stringC/d' infile > out
# delabc : del stringA.B.C
/stringA/d
/stringB/d
/stringC/d
sed -f delabc infile > out