[Klug-general] Space to underscore?

David Halliday david.halliday at gmail.com
Tue May 15 12:58:01 UTC 2012


I can't take all the credit, it's a rehash/extension of an answer posted on
this list by James here a week or two ago.

On 15 May 2012 13:51, Paul Littlefield <info at paully.co.uk> wrote:

> 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
>
>
> ______________________________**_________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/**mailman/listinfo/kent<https://mailman.lug.org.uk/mailman/listinfo/kent>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20120515/6171a95f/attachment.htm>


More information about the Kent mailing list