public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: cygwin rename util doesn't parse leading dash in expression argument correctly (thinks it is an option)
Date: Thu, 04 Sep 2014 10:17:00 -0000	[thread overview]
Message-ID: <54083C3E.3010107@gmail.com> (raw)
In-Reply-To: <CAMQzRBp9ML_PpuqhWQeUx_79zdBfv=pqhpLrNOtd8LN+eR7+AQ@mail.gmail.com>

On 03/09/2014 23:17, Dat Head wrote:
> 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)

curious because it is the almost standard (gnu) solution in
  most of the utilities.
I guess it is included in most used option parser

touch, mv , cp, .. are all working in the same way.

Otherwise try to rename/move a file called "-v" ...
(without using "./-v" )

> 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!])

It is working and the maintainer sees no reason to change it ;-)

I don't think basic stuff needs to be changed a lot.

Regards
Marco


--
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

  reply	other threads:[~2014-09-04 10:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 21:17 Dat Head
2014-09-04 10:17 ` Marco Atzeri [this message]
2014-09-04 11:53   ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2014-09-02 14:43 Dat Head
2014-09-02 14:57 ` Marco Atzeri
2014-09-04  8:51 ` Csaba Raduly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54083C3E.3010107@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).