Code Comments
Programming Forum and web based access to our favorite programming groups.In article <61792dff.0410020334.356747aa@posting.google.com>, Svatoboj wrote:
> Ed Morton <morton@lsupcaemnt.com> wrote:
...
...
> Thank you for your effort. This worked for. I modyfied it
> slightly to fit my expectations:
>
> ls | awk '{system("mv \"" $0 "\"" " "$1"_"$2 )}'
...
> I just wondered how to do it easily without using perl for instance.
zsh
autoload zmv
zmv '* *.jpg' '${f// ##/_}'
here " ##" matches 1 or more space characters. Use
less ${^fpath}/zmv(N) or
man zshcontrib
/zmv
to see the zmv documents.
Pavol
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.