add other

add file extension to all files using rename
This commit is contained in:
onceupon 2018-05-25 17:25:10 +08:00 committed by GitHub
parent cdc039aca4
commit ee27648b74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2244,6 +2244,14 @@ basename filename.gz .gz
zcat filename.gz> $(basename filename.gz .gz).unpacked 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) ##### Use the squeeze repeat option (e.g. /t/t --> /t)
```bash ```bash