🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1611

Re: Ayuda BATCH

#1611
From: Cristian Gutierrez
Date: Sat, 15 Jul 2006 15:44
30 lines
1796 bytes
Hoy en la ma~nana, Mauricio Gomez dijo:
> Cristian Gutierrez wrote:
>> Ayer en la noche, Mauricio Gomez dijo:

[...]

>>>#!/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
>
> :p
>
> ls *.jpg | awk '{print ++k "_" $1}'

Ok, con dos procesos entonces:

  ls *.jpg | nl -s _ -w 1

:D

-- 
Guti
Note: No trees were destroyed for this posting...
                          ...However, several bushes WERE brutally beaten!
Technical Details
Message-ID: <873bd298kp.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> <87psg75wuo.fsf@guti.cl> <e99vbg$b1t$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 11:44:22 -0400
Organization: DCC/Uchile
Lines: 30
Message-ID: <873bd298kp.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> <87psg75wuo.fsf@guti.cl>
 <e99vbg$b1t$1@news.nivel5.cl>
NNTP-Posting-Host: vpn-client-021.cec.uchile.cl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: localhost.localdomain 1152978263 11713 172.17.35.21 (15 Jul 2006 15:44:23 GMT)
X-Complaints-To: news@localhost.localdomain
NNTP-Posting-Date: Sat, 15 Jul 2006 15:44:23 +0000 (UTC)
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Cancel-Lock: sha1:jaXRZdGuySUHLRQ0VCiELCsDK2w=