cygwin rename util doesn't parse leading dash in expression argument correctly (thinks it is an option)

Dat Head dathead2@gmail.com
Wed Sep 3 21:17:00 GMT 2014


On Tue, Sep 2, 2014 at 10:57 AM, Marco Atzeri <marco.atzeri@gmail.com> wrote:
> On 02/09/2014 16:43, Dat Head wrote:
>>
>> Cygwin 1.7.30-1
>>
>> $ ls -l *-fixed.flac
>> -rw-r--r-- 1 foo None 0 Sep  1 13:47 a-fixed.flac
>> -rw-r--r-- 1 foo None 0 Sep  1 13:47 b-fixed.flac
>>
>> $ rename '-fixed' '' *-fixed.flac
>> rename: unknown option -- f
>
>
> you need to tell rename that the options are ended with --
>
> $ rename -- '-fixed' '' *-fixed.flac
>
> $ ls *flac
> a.flac  b.flac

thanx for the tip, haven't had to use that since old days of  "startx
clientopts -- serveropts &"

but yet again I'm roped with having to wrap another case statement
around pieces of scripts for cygwin specific items (because the same
syntax of "rename --" doesn't work on redhat linux or another distro a
friend tried for me)

i'm not complaining, i love cygwin!

that is a quite old version of util-linux I wonder does anyone know
the factors involved in staying with that one? (everything else is
mostly so wonderfully almost bleeding edge [which I like!])

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list