for f in .; do pre="${f%.}"; suf="${f##.}"; mv -i -f -- "$f" "${pre//./_}.${suf}"; done
Replace all dots in filenames except the extension on Linux2021年1月21日 · Shafiq Alibhai | 语言:EnEsFrfor f in .; do pre="${f%.}"; suf="${f##.}"; mv -i -f -- "$f" "${pre//./_}.${suf}"; done Comments are powered by Remark42 and require JavaScript.