Skip to content

Commit e3f2d56

Browse files
committed
added basic shell script which replace file name
1 parent 751d01d commit e3f2d56

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

file_rename.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
### THIS SCRIPT SEARCH ALL FILE EXTENSION WITH TXT AND WILL REPLACE NAME WITH SPACE
4+
5+
search_files="*.txt"
6+
find $1 -name "$search_files" -type f -print0 | \
7+
while read -d $'\0' f; do mv -v "$f" "${f// /_}"; done

0 commit comments

Comments
 (0)