[Klug-general] Space to underscore?

Paul Littlefield info at paully.co.uk
Tue May 15 12:51:34 UTC 2012


On 15/05/12 13:44, David Halliday wrote:
> #!/bin/bash
>
> find $1 -name "* *" |
> while IFS= read -r NAME;
> do
>    DEST=`echo "$NAME" | tr ' ' '_'`
>    mv -v "${NAME}" "${DEST}"
> done
  

Nice one David.

Paully



More information about the Kent mailing list