🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Leer líneas de un fichero

#15101
From: kuantiko
Date: Fri, 18 Aug 2000 00:00
62 lines
2132 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oscar Manuel wrote:
> 1) Esto es por simple curiosidad ¿Se pueden especificar dos (o más)
> shells en un mismo script? Ejemplo:
> 
> #!/bin/bash
> 
> ...
> 
> #!/usr/bin/perl
> 
> ...

	No. Los caracteres #!, de existir, han de ser los dos primeros del
script. De hecho, esto:
- ---------------------
#!/bin/bash
echo -e "Esto es un script en bash \\a \\a \\a"
#!/usr/bin/python
a="""
	Si esto se lee, es porque se pueden especificar dos intérpretes 
en el mismo script.
"""
print a
- ---------------------
	No funciona. En su lugar, el shell interpreta la segunda indicación
como un comentario más (al ir precedido por almohadilla), y sigue
interpretando el código con bash, con lo cual me sale la ayuda de la
orden print del shell, indicando un uso incorrecto.

Un saludo.
- -- 
 
Jesús Carrete Montaña ----> KUANTIKO
 ___________________________________________ 
|    .~.                                    |
|    /V\     jrcarmon at teleline.es        |
|   // \\    Linux Registered               |
|  /(   )\   User #158442                   |
|   ^`~'^                                   |
|___________________________________________|

Clave pública PGP disponible por e-mail.

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1i for non-commercial use <http://www.pgpi.com/>

iQA/AwUBOZzvylXBzV6UX+HYEQIecQCfe5++XFwowsf99YJmPUrWuOyQgRMAn2X8
lFu770qlRrdYAtMdlhqbzpXX
=X+kh
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <399CFDE9.9A7B01DC@teleline.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39999EE1.BFBF9AE4@omgs.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,1acfdd076705ea7c
X-Google-Attributes: gidf86c8,public
From: kuantiko <jrcarmon@teleline.es>
Subject: Re: Leer líneas de un fichero
Date: 2000/08/18
Message-ID: <399CFDE9.9A7B01DC@teleline.es>
X-Deja-AN: 660040860
Content-Transfer-Encoding: quoted-printable
References: <39999EE1.BFBF9AE4@omgs.es>
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: Quanta Studios
Mime-Version: 1.0
Reply-To: jrcarmon@teleline.es
Newsgroups: es.comp.os.linux.programacion