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

Re: zmv, case insensivity and possible the lack of coffee



On 08/08/2015 01:43 AM, Meino.Cramer@xxxxxx wrote:
> Hi,
> 
> To sanitize some odd filenames I wrote a script like this
> 
>     #! /bin/zsh
>     detox '*=\ *'
>     zmv '(*)OddString(*)' '$1$2'
>     zmv '(*)oddstring(*)' '$1$2'
> 

If you are just asking how to make oddstring case-insensitive.
zmv '(*)(#i)oddstring(*)' '$1$2' # would do it.
(#i) is a globbing flag found in zshexpn under filename generation.



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