Skip to main content
Commonmark migration
Source Link

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

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. Actually any sequence but leading/trailing spaces that is - those are automatically truncated (which is also, I think, a beneficial behavior). Thanks to Gilles for pointing this out.

This 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...

##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. Actually any sequence but leading/trailing spaces that is - those are automatically truncated (which is also, I think, a beneficial behavior). Thanks to Gilles for pointing this out.

This 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...

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. Actually any sequence but leading/trailing spaces that is - those are automatically truncated (which is also, I think, a beneficial behavior). Thanks to Gilles for pointing this out.

This 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...

added 197 characters in body
Source Link
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. ItActually any sequence but leading/trailing spaces that is - those are automatically truncated (which is also, I think, a beneficial behavior). Thanks to Gilles for pointing this out.

This 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...

##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...

##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. Actually any sequence but leading/trailing spaces that is - those are automatically truncated (which is also, I think, a beneficial behavior). Thanks to Gilles for pointing this out.

This 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...

Source Link
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...