🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: bash o sh

#406
From: J.A. Gutierrez
Date: Thu, 07 Feb 2008 11:26
21 lines
1777 bytes
Kitano <kitano@-nospam-ono.com> wrote:

:> Si lanzo un script s.sh poniendo al principio !#/bin/bash con
:> sh s.sh, realmente no coge el bash sino sh. De hecho no funciona let
:> y function.

: Supongo que el she bang (que es como los anglosajones llaman a la primera
: l�nea de un script donde se dice el int�rprete que se va a usar) s�lo se
: lee cuando no se le indica espec�ficamente al SO que interprete se va a
: usar para lanzar un script. Si ejecutas el script invoc�ndolo por su nombre
: (por todo el path o con ./s.sh) deber�a usar bash.

	Mas bien al contrario.
	Si lo invocas por nombre, es cuando usa el interprete que diga el "#!",


-- 
PGP and other useless info at      \
http://webdiis.unizar.es/~spd/      \
finger://daphne.cps.unizar.es/spd    \       Timeo Danaos et dona ferentes
ftp://ivo.cps.unizar.es/pub/          \                         (Virgilio)   
Technical Details
Message-ID: <foepsu$6ac$1@aioe.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!aioe.org!not-for-mail
References: <nopt65-qk7.ln1@miservidor.org> <fnhnh7$3tc$1@cagarruta.escomposlinux.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,3a0a65ef7a88ec21
X-Google-Attributes: gidf86c8,public,usenet
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!aioe.org!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: bash o sh
Date: Thu, 7 Feb 2008 12:26:23 +0100 (CET)
Organization: Rank
Lines: 21
Message-ID: <foepsu$6ac$1@aioe.org>
References: <nopt65-qk7.ln1@miservidor.org> <fnhnh7$3tc$1@cagarruta.escomposlinux.org>
NNTP-Posting-Host: pKUdMU5VZvMSr3KDTXM2hw.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: tin/1.4.7-20030322 ("Suggestions") (UNIX) (IRIX64/6.5 (IP30))