X-Recipient: archive-cygwin AT delorie DOT 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=EZF/mzZilLGJczcCNLeLnjy0aBqmVMzNPSt6S25jO09 QPUjoB2MJaOiBNn39BOam87FWtc1n+51db1Tm/vRF3qSOidDPWMkfSvj2tbJkOz9 aJtdLIHIz0TATEzA+eAQHXDlvTWDSapmDldrJF5pEQzSnWZI2S+xujUw7IoKiNUI = 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=MnafCHtFJ+/82kUUigdWmaI+mSI=; b=P4+HXKBpsGZi6sSGN IIK2Pm4WolmtQwFwv8wOg/SyRIR+i0tvziEu1j1qtTaE5ivInp8RlrxvFdApLfDh UHZCrssBjlmKTyw2Iotjcm7MnWTMy6fMb+nN9tWNd5geP7BBo1TAW9lvyv1frxe9 OOJ5UZmaPWYWCsu/BGid+D1eYE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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-qc0-f171.google.com X-Received: by 10.140.102.119 with SMTP id v110mr5252353qge.38.1409825861887; Thu, 04 Sep 2014 03:17:41 -0700 (PDT) Message-ID: <54083C3E.3010107@gmail.com> Date: Thu, 04 Sep 2014 12:17:34 +0200 From: Marco Atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin rename util doesn't parse leading dash in expression argument correctly (thinks it is an option) References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 03/09/2014 23:17, Dat Head wrote: > On Tue, Sep 2, 2014 at 10:57 AM, Marco Atzeri 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