🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #12640

Re: Duda sobre bash.

#12640
From: Gonzalo Paniagua Javier
Date: Tue, 19 Jun 2001 13:45
19 lines
1579 bytes
Juan Pablo Hierro �lvarez <hierro@no.al.xspan.es> escribi�:
> Mi duda es saber si existe alg�n comando r�pido para seleccionar todos
> los argumentos salvo el primero. Lo �nico que se me ocurre es ir acumulando
> los argumentos en una variable intermedia con un bucle: for i in $* que salte
> la primera iteraci�n; pero sospecho que debe existir alg�n m�todo m�s simple.

	�Es esto lo que quieres?

------ ejem.sh
#!/bin/sh

CMD=$1
shift
echo El comando es: ${CMD}
echo Los argumentos: $*
unset CMD
exit 0

------ fin de ejem.sj
Technical Details
Message-ID: <pheng9.i81.ln@lalo.micasa>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.158.233.21!news1.ebone.net!news.ebone.net!newsfeed2.news.nl.uu.net!sun4nl!ams.uu.net!newsf01.!newsr01.ono.com.POSTED!not-for-mail
References: <slrn9iud2b.40d.hierro@otilio.cps.unizar.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,626f9d7758489a9b
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-06-19 06:44:49 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.158.233.21!news1.ebone.net!news.ebone.net!newsfeed2.news.nl.uu.net!sun4nl!ams.uu.net!newsf01.!newsr01.ono.com.POSTED!not-for-mail
From: Gonzalo Paniagua Javier <gpanjav@jazzfree.com>
Subject: Re: Duda sobre bash.
Newsgroups: es.comp.os.linux.programacion
References: <slrn9iud2b.40d.hierro@otilio.cps.unizar.es>
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.4.5-ac7 (i586))
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <pheng9.i81.ln@lalo.micasa>
Lines: 20
Date: Tue, 19 Jun 2001 13:45:07 GMT
NNTP-Posting-Host: 62.42.16.241
X-Trace: newsr01.ono.com 992958307 62.42.16.241 (Tue, 19 Jun 2001 15:45:07 MET DST)
NNTP-Posting-Date: Tue, 19 Jun 2001 15:45:07 MET DST