[Digikam-users] Not completely but a bit off topic question: looking for texteditor with macro capabillity

sleepless sleeplessregulus at hetnet.nl
Sun Aug 28 18:55:45 BST 2011


Op 28-08-11 19:27, Benjamin GIRAULT schreef:
> 2011/8/28 Johnny<yggdrasil at gmx.co.uk>:
>> sleepless<sleeplessregulus at hetnet.nl>  writes:
>>
>>> Hi linux people,
>>>
>>> I have been wrestling a bit and ran quite quick in some sort of obstacle.
>>>
>>> this works fine
>>> mv *.* ../TEMP2/
>>>
>>>
>>> but this one
>>>   for f in $(ls); do mv ${f} ../TEMP2/; done
>>>
>>> does not work if you have file names with spaces.
>>>
>>> does that mean that for comfortable working in linux I have to rename
>>> my 1 billion files to file_names_like_this.ext?
>>>
>> No, you can just use something like
>> ,----
>> | for f in "$(ls)"; do mv "${f} ../TEMP2/"; done
>> `----
>> to handle spaces.
> That may not work because the second " character does not seem to be
> at the right place. Try this:
>
> ,----
> | for f in "$(ls)"; do mv "${f}" ../TEMP2/; done
> `----
>
I tried the quotes at lots of different places, but no luck.
I just found a page somewhere stating that it will never work with for. 
For will always break the line despite of the quotes.
It seems to be possible with while, but thats another story.

Thanks a lot sofar,
Best,
Rinus



More information about the Digikam-users mailing list