X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=KO8PZ0CzsNE5k4TEQnTuE6KbvVR9XzPogMvk3d+wv/N
	FYU9RkLRSu7zdTQy9jSSHVYEE8Fl+jiPrb7bLfArSCgNIMm4AQMFpY0jZo6kLytI
	+cu9knDOTPCPM5Fi2jPA+wYwVs8v5mr1D7EzUg19YQJoQlN5lbL1ApK/Gc7W9A38
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=UHmNq04UWiv4jRiNHuMHQfnveBI=; b=j4UMgQWJhaL2JPW9/
	6MpZtX1mX+wxaYG8hyhUjU1MRaoBfCITHfZWOTK+yTp5cLBn9YoX7IFG7dZJGXlL
	RP0Xj8dbP4kgyVKngr6x/284i3NIaDdGKqw20rRKGz8Xzf8bt+Af4VTZxdrJ7akM
	Afqx8yiksdnoX2Yy1Vz5pi8qIA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wg0-f42.google.com
X-Received: by 10.194.23.69 with SMTP id k5mr24153347wjf.31.1409669828829;        Tue, 02 Sep 2014 07:57:08 -0700 (PDT)
Message-ID: <5405DAC0.70405@gmail.com>
Date: Tue, 02 Sep 2014 16:57:04 +0200
From: Marco Atzeri <marco.atzeri@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version: 1.0
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: cygwin rename util doesn't parse leading dash in expression argument correctly (thinks it is an option)
References: <CAMQzRBrsYe4BDijn=B2V6TkKt7Gv_ZqTEcWXmpaJ437A8ZgHYA@mail.gmail.com>
In-Reply-To: <CAMQzRBrsYe4BDijn=B2V6TkKt7Gv_ZqTEcWXmpaJ437A8ZgHYA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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


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

