Thread View: uch.ing.consultas
7 messages
7 total messages
Started by VALLARINO ESNAOLA CRISTIAN IGNA
Sun, 04 Aug 1996 00:00
Problema con UNIX
Author: VALLARINO ESNAOLA CRISTIAN IGNA
Date: Sun, 04 Aug 1996 00:00
Date: Sun, 04 Aug 1996 00:00
30 lines
1656 bytes
1656 bytes
Hola.
Bueno he intentado mucho lograr correr este simple script de unix,
pero se me ha hecho imposible:
#!/bin/sh
echo "no"
if ("$1" == "blah") then
# uhu
echo "esta malo"
echo "pucha kai"
endif
No se que realmente tiene, pero cuando lo ejecuto me retorna el error:
prueba: syntax error at line 9: 'End of file' unexpected
Alguien sabe que tiene de malo mi script???
atte
--
/\ /\
---------. ,' `---------------------------------------' `. ,-------------
-,_ \/ Cristian Vallarino \/ _,-
\ cvallari@cec.uchile.cl /
\ aka NUtRiNO /
,_ | http://cipres.cec.uchile.cl/~cvallari | _,
`-,__| SPiRiT Member |__,-'
_______' <this space is for lease> `_______
Re: Problema con UNIX
Author: Antonio Napoli C.
Date: Sun, 04 Aug 1996 00:00
Date: Sun, 04 Aug 1996 00:00
22 lines
1263 bytes
1263 bytes
VALLARINO ESNAOLA CRISTIAN IGNA wrote:
>
> Hola.
> Bueno he intentado mucho lograr correr este simple script de unix,
> pero se me ha hecho imposible:
>
> #!/bin/sh
> echo "no"
> if ("$1" == "blah") then
> # uhu
> echo "esta malo"
> echo "pucha kai"
>
> endif
>
porque no pruebas con un "fi" en vez de un "endif"?
--
Antonio Napoli C.
E-mail:napoli@inf.utfsm.cl
http://www.inf.utfsm.cl/~napoli
Re: Problema con UNIX
Author: Alvaro Navarro M.
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
9 lines
977 bytes
977 bytes
Antonio Napoli C. (napoli@inf.utfsm.cl) wrote: : porque no pruebas con un "fi" en vez de un "endif"? O si no, por que no pruebas "/bin/csh" en vez de "/bin/sh" ? :-) -alv-
Re: Problema con UNIX
Author: VALLARINO ESNAOLA CRISTIAN IGNA
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
17 lines
1526 bytes
1526 bytes
Roberto Z. (rez@cec.uchile.cl) wrote:
: Hola tu problema es que estas mezclando sh con csh y un poco de C..
: tu programa en sh se escribe asi:
Muchas gracias.. ahora si me funciono! gracias de nuevo.
atte
--
/\ /\
---------. ,' `---------------------------------------' `. ,-------------
-,_ \/ Cristian Vallarino \/ _,-
\ cvallari@cec.uchile.cl /
\ aka NUtRiNO /
,_ | http://cipres.cec.uchile.cl/~cvallari | _,
`-,__| SPiRiT Member |__,-'
_______' <this space is for lease> `_______
Re: Problema con UNIX
Author: Roberto Z.
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
39 lines
1492 bytes
1492 bytes
VALLARINO ESNAOLA CRISTIAN IGNA (cvallari@cec.uchile.cl) wrote:
: Hola.
: Bueno he intentado mucho lograr correr este simple script de unix,
: pero se me ha hecho imposible:
:
: #!/bin/sh
: echo "no"
: if ("$1" == "blah") then
: # uhu
: echo "esta malo"
: echo "pucha kai"
:
: endif
:
: No se que realmente tiene, pero cuando lo ejecuto me retorna el error:
:
: prueba: syntax error at line 9: 'End of file' unexpected
Hola tu problema es que estas mezclando sh con csh y un poco de C..
tu programa en sh se escribe asi:
#!/bin/sh
if [ ! $# -eq 1 ] ; then
echo "Pocos Parametros"
exit 1
fi
if [ $1 = "blah" ] ; then
echo "OK"
fi
Para meyor detalles ve el man del sh ( es bastante bueno )
Chao
Roberto
Re: Problema con UNIX
Author: VALLARINO ESNAOLA CRISTIAN IGNA
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
32 lines
1819 bytes
1819 bytes
Roberto Z. (rez@cec.uchile.cl) wrote:
: #!/bin/sh
:
: if [ ! $# -eq 1 ] ; then
: echo "Pocos Parametros"
: exit 1
: fi
:
: if [ $1 = "blah" ] ; then
: echo "OK"
: fi
: Para meyor detalles ve el man del sh ( es bastante bueno )
: Chao
Sabes, me funciona sin problemas si intento ejecutar solo 1 linea de comando
dentro del if, pero si quiero que se ejecuten mas cosas me tira el mismo
error que antes.
Intente colocando ; al final de cada linea, al final de la ultima, y varias
combinaciones mas, pero no me resulta.
de antemano muchas gracias.
atte
--
Cristian Vallarino __ __ __ __ Facultad Ciencias Fisicas
aka NUtRiNO. / \ / \ / \ / \ y Matematicas, U.de Chile
____________________/ __\/ __\/ __\/ __\_____________________________
___________________/ /__/ /__/ /__/ /________________________________
| / \ / \ / \ / \ \____ voice: (562) XxX-XxXx
cvallari@cec.uchile.cl \_/ \_/ \_/ \ o \ FAX: (562) oio-oioi
http://cipres.cec.uchile.cl/~cvallari \_____/--<
Re: Problema con UNIX
Author: VALLARINO ESNAOLA CRISTIAN IGNA
Date: Mon, 05 Aug 1996 00:00
Date: Mon, 05 Aug 1996 00:00
26 lines
2118 bytes
2118 bytes
VALLARINO ESNAOLA CRISTIAN IGNA (cvallari@cec.uchile.cl) wrote:
: Sabes, me funciona sin problemas si intento ejecutar solo 1 linea de comando
: dentro del if, pero si quiero que se ejecuten mas cosas me tira el mismo
: error que antes.
: Intente colocando ; al final de cada linea, al final de la ultima, y varias
: combinaciones mas, pero no me resulta.
Me retracto de lo anterior, ya que el error estaba en otra parte, y era que
faltaba un ' por ahi.
Ahora me funciona sin problemas, gracias por la ayuda.
atte
--
''~``
( o o )
+-------------------------.oooO--(_)--Oooo.-----------------------------+
| Cristian Vallarino | To do is to be : Socrates |
| cvallari@cec.uchile.cl | To be is to do : Platon |
| aka NUtRiNO | Do Be Do Be Do : Sinatra |
| http://cipres.cec.uchile.cl/~cvallari | Scoobie Doobie Doo : Scoobie |
| .oooO |-------------------------------|
| SPiRiT ( ) Oooo. MeMBeR |
+---------------------------\ (----( )--------------------------------+
\_) ) /
(_/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads