Last active
October 17, 2019 06:16
-
-
Save zakrodionov/8248eb542dcb74183e30953a869adadf to your computer and use it in GitHub Desktop.
Замена символов переименование полезные команды#regexp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *\ *; do mv "$f" "${f// /_}"; done --удаляет пробелы в названии файлов | |
for a_file in *;do mv -v "$a_file" `echo "$a_file" | tr [:upper:] [:lower:]` ;done; ---делает lowercase | |
rename 's/[\(\)]//g' *.txt переименует все файлы .txt, удалив круглые скобки. | |
rename 's/[\-]//g' *.jpg удалив минус(-). | |
for file in *; do mv "$file" `echo $file | tr '-' '_'` ; done - замена - на _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment