Skip to main content
1 of 3
mikeserv
  • 221
  • 1
  • 5

##POSIX sh + GNU find + GNU mv 67 ASCII bytes + one (literal) space

find    -d  -exec   sh  -cf 'IFS=\ ;IFS=_   set $0;mv   --b=t   "$0"    "$*"'   {}  \;

I don't know if it fits, but with this any sequence of spaces is elided to a single _ - I like it anyway. It just uses the internal field separator to separate fields.

It's fairly... chatty...

...oh man. I knew the tab thing was cheap, but I thought it was at least clever. Now I'm just late to the party...

mikeserv
  • 221
  • 1
  • 5