🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1609

Re: Ayuda BATCH

#1609
From: Cristian Gutierrez
Date: Sat, 15 Jul 2006 04:13
21 lines
1608 bytes
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

-- 
Guti
C is for Cookies.  Perl is even better for Cookies.
Technical Details
Message-ID: <87psg75wuo.fsf@guti.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.cec.uchile.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>

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!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.cec.uchile.cl!not-for-mail
From: Cristian Gutierrez <crgutier@dcc.uchile.cl>
Newsgroups: chile.comp.programacion
Subject: Re: Ayuda BATCH
Date: Sat, 15 Jul 2006 00:13:35 -0400
Organization: DCC/Uchile
Lines: 21
Message-ID: <87psg75wuo.fsf@guti.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>
NNTP-Posting-Host: vpn-client-024.cec.uchile.cl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: localhost.localdomain 1152936816 11840 172.17.35.24 (15 Jul 2006 04:13:36 GMT)
X-Complaints-To: news@localhost.localdomain
NNTP-Posting-Date: Sat, 15 Jul 2006 04:13:36 +0000 (UTC)
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Cancel-Lock: sha1:fC2Mnno6q4HQjvX8zfTUqaIDyn8=