From ee27648b74085f81a141719116a526da4dff1f2e Mon Sep 17 00:00:00 2001 From: onceupon Date: Fri, 25 May 2018 17:25:10 +0800 Subject: [PATCH] add other add file extension to all files using rename --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 457abeb..3087576 100644 --- a/README.md +++ b/README.md @@ -2244,6 +2244,14 @@ basename filename.gz .gz zcat filename.gz> $(basename filename.gz .gz).unpacked ``` +##### Add file extension to all file(e.g add .txt) +```bash +rename s/$/.txt/ * +# You can use rename -n s/$/.txt/ * to check the result first, it will only print sth like this: +# rename(a, a.txt) +# rename(b, b.txt) +# rename(c, c.txt) +``` ##### Use the squeeze repeat option (e.g. /t/t --> /t) ```bash