Comment

Jan Kokoska

Here is one Linux geek who didn't manage to figure out the crazy sed replace one-liner this time (because he was thinking about the generic case, i.e. not thinking).. other approaches are:

1) using tr,

for i in $(find -iname '_*') do; mv $i `echo $i | tr -d '_'`; done | sh -s

2) using simple sed,

for i in $(find -iname '_*') do; mv $i `echo $i | sed -e 's/_//'`; done | sh -s

3) OK, I didn't swallow my pride just yet.

find -iname '_*' | sed -e 's/\([^_]\+\)_\(.*\)/mv \1_\2 \1\2/' | sh -s

*cough* I thought Python was supposed to be efficient *cough* ;)