Skip to main content

Thread: Mass Rename - fix this script please


hi

me mass rename? need replace brackets nothing. , have 0 experience scripts. found 1 , kind of edited it, cannot work right. here:

left bracket:
code:
> in *;  > x=$( echo $i | grep '(' | sed 's/(/\/g' );  > if [ -n "$x" ];  > mv $i $x;  > fi;  > done;
for right bracket:
code:
> in *.html;  > x=$( echo $i | grep ')' | sed 's/)/\-/g' );  > if [ -n "$x" ];  > mv $i $x;  > fi;  > done;
thanks!

hi minigilani.

can use 'rename' , solve couple of runs:
code:
rename 's/\(//g' *    rename 's/\)//g' *
hope helps.
regards.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Mass Rename - fix this script please


Ubuntu

Comments

Popular posts from this blog

Adobe Acrobat Pro , Terminal Server Use

Thread: transmission-daemon isn't playing nice: "409: Conflict"

Thread: gpg: Conflicting Commands