mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-12-23 16:56:35 +00:00
add other
add file extension to all files using rename
This commit is contained in:
parent
cdc039aca4
commit
ee27648b74
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user