Skip to content

Instantly share code, notes, and snippets.

@jgwill
Created December 28, 2022 03:41
Show Gist options
  • Save jgwill/f3dfaa6ae02af4e737b357de8bb7512c to your computer and use it in GitHub Desktop.
Save jgwill/f3dfaa6ae02af4e737b357de8bb7512c to your computer and use it in GitHub Desktop.
Bash Rename files with parenthesis and remove them
cdir=$(pwd);for d in $(cat _dist.txt);do cd $d;for f in *;do echo $f;fx1=${f//\(/_};fx=${fx1//\)/};mv "$f" "$fx";done;cd $cdir;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment