Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: [ANNOUNCEMENT] Updated: cygutils-1.2.7-1 Date: Thu, 14 Apr 2005 14:59:30 -0400 Lines: 37 Message-ID: References: <20050413050050 DOT 4F97A57D98 AT cygbert DOT vinschen DOT de> <20050414173737 DOT GB12274 AT trixie DOT casa DOT cgf DOT cx> <871x9d5ir6 DOT fsf AT peder DOT flower> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: pcp04399769pcs.nrockv01.md.comcast.net User-Agent: MicroPlanet-Gravity/2.70.2067 X-Archive: encrypt X-IsSubscribed: yes > $ head -1 /usr/bin/rename > #!/usr/bin/perl -w Yes, Debian includes a perl script /usr/bin/rename, which seems more powerful than Cygwin rename: NAME rename - renames multiple files SYNOPSIS rename [ -v ] [ -n ] [ -f ] perlexpr [ files ] DESCRIPTION "rename" renames the filenames supplied according to the rule specified as the first argument. The perlexpr argument is a Perl expression which is expected to modify the $_ string in Perl for at least some of the filenames specified. If a given filename is not modified by the expression, it will not be renamed. If no filenames are given on the command line, filenames will be read via standard input. For example, to rename all files matching "*.bak" to strip the extension, you might say rename 's/\.bak$//' *.bak To translate uppercase names to lower, you'd use rename 'y/A-Z/a-z/' * This is a more powerful approach, because it uses Perl regexps. OTOH, that makes it hard for non-Perl initiates to use. Maybe this rename could also be included in Cygwin under a different name, say rename2 or prename. A. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/