Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: more fun with parameter expansion



> for i (*(/N)) {mv -v "$i" "${(L)i:gs/ /_/}"}
> for i (*/**/*(/N)) {mv -v "${${(L)i%/*/}:gs/ /_/}/${${${i#*/}%/}##*/}" "${(L)i:gfor i (**/*(N^/)) {mv -v "${i}" "${(L)i:gs/ /_/}"}
> 

Hmm... I'll space them this time.

for i (*(/N)) {mv -v "$i" "${(L)i:gs/ /_/}"}

for i (*/**/*(/N)) {mv -v "${${(L)i%/*/}:gs/ /_/}/${${${i#*/}%/}##*/}" "${(L)i:gs/ /_/}"}

for i (**/*(N^/)) {mv -v "${i}" "${(L)i:gs/ /_/}"}



Messages sorted by: Reverse Date, Date, Thread, Author