Article View: es.comp.os.linux.programacion
Article #777Re: Renombrar ficheros
From: Alberto Cabello Sanchez
Date: Thu, 28 Sep 2006 08:38
Date: Thu, 28 Sep 2006 08:38
18 lines
1467 bytes
1467 bytes
Gonzalo P�rez de Olaguer C�rdoba wrote:
> Hola ravenheart <ravenheart.j@gmail.com>
> el Mon, 25 Sep 2006 18:24:51 +0100 escribiste:
>
>
>>Soy nuevo en esto del scripting.
>>Tengo una serie de ficheros en un directorio con la misma extensi�n
>>(01.xxx, 02.xxx, ...) y quiero renombrarlos a (01.yyy, 02.yyy, ...)
>
>
> renombrar:
>
> for i in *.xxx; do mv "$i" "${i%%.xxx}.yyy"; done
>
Esto no me lo esperaba yo de ti: tres caracteres in�tiles.
for i in *.xxx; do mv "$i" "${i%xxx}yyy"; done
Technical Details
Message-ID:
<efg1mv$7c8$1@emma.aioe.org>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed.x-privat.org!aioe.org!emma.aioe.org!aioe.org!not-for-mailReferences:
<ef93cn$pf2$1@hefestos.uned.es> <20060925233434.02d2d5d3@petres.salonet.snet>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,49b05d3cf6e2b1ae X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,ASCII From: Alberto Cabello Sanchez <gallina@unex.es> Newsgroups: es.comp.os.linux.programacion Subject: Re: Renombrar ficheros Date: Thu, 28 Sep 2006 10:38:54 +0200 Organization: Aioe.org NNTP Server Lines: 18 Message-ID: <efg1mv$7c8$1@emma.aioe.org> References: <ef93cn$pf2$1@hefestos.uned.es> <20060925233434.02d2d5d3@petres.salonet.snet> NNTP-Posting-Host: 3cPl5SUz8fJiZ7Q2x1hhvA.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Accept-Language: en-us, en, es User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050905 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed.x-privat.org!aioe.org!emma.aioe.org!aioe.org!not-for-mail