🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1610

Re: Ayuda BATCH

#1610
From: Mauricio Gomez
Date: Sat, 15 Jul 2006 05:44
29 lines
1694 bytes
:p

ls *.jpg | awk '{print ++k "_" $1}'


rro


Cristian Gutierrez wrote:
> Ayer en la noche, Mauricio Gomez dijo:
> 
>>Ya que quieres aprender, te recomendaria un shell mas avanzado. De
>>www.cygwin.com puedes bajar el cygwin, y lo que quieres hacer se logra
>>con:
>>
>>#!/bin/sh
>>
>>for archivo in *.jpg
>>do
>>     contador=$((contador + 1))
>>     echo $contador\_$archivo
>>done
> 
> 
> Si estamos con esas, se puede bajar Perl (de Cygwin o ActiveState) y
> hacer algo asi:
> 
> $ perl -e 'map { printf "%d__%s\n", ++$n, $_ } @ARGV' *.jpg
> 
Technical Details
Message-ID: <e99vbg$b1t$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
References: <e96aio$h37$1@news.nivel5.cl> <44b7ea03$1_1@nova.entelchile.net> <e98qsr$rgj$1@manutara.inf.utfsm.cl> <e99e4h$6r9$1@news.nivel5.cl> <e99nuu$9f5$1@news.nivel5.cl> <87psg75wuo.fsf@guti.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,229a57d674b0914e
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
From: Mauricio Gomez <buena@pregunta.com>
Newsgroups: chile.comp.programacion
Subject: Re: Ayuda BATCH
Date: Sat, 15 Jul 2006 01:44:14 -0400
Organization: Varios
Lines: 29
Message-ID: <e99vbg$b1t$1@news.nivel5.cl>
References: <e96aio$h37$1@news.nivel5.cl> <44b7ea03$1_1@nova.entelchile.net> <e98qsr$rgj$1@manutara.inf.utfsm.cl> <e99e4h$6r9$1@news.nivel5.cl> <e99nuu$9f5$1@news.nivel5.cl> <87psg75wuo.fsf@guti.cl>
NNTP-Posting-Host: pc-23-73-104-200.cm.vtr.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.nivel5.cl 1152942256 11325 200.104.73.23 (15 Jul 2006 05:44:16 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Sat, 15 Jul 2006 05:44:16 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <87psg75wuo.fsf@guti.cl>