https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S10.sh&feed=atom&action=history
Curso de Programación en Bash/S10.sh - Historial de revisiones
2024-03-28T18:49:23Z
Historial de revisiones para esta página en el wiki
MediaWiki 1.32.1
https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S10.sh&diff=4510&oldid=prev
Rrc en 12:54 26 ene 2013
2013-01-26T12:54:43Z
<p></p>
<p><b>Página nueva</b></p><div>__NOTOC__<br />
* [[:#S10.sh | S10.sh]]<br />
** [[:#Resultado | Resultado]]<br />
** [[:#Explicación | Explicación]]<br />
<br />
== S10.sh ==<br />
<br />
<syntaxhighlight lang="bash" line="GESHI_FANCY_LINE_NUMBERS"><br />
<br />
#!/bin/bash<br />
<br />
ENTRADA=algun<br />
while [ "$ENTRADA" != "AdioS" ]<br />
do<br />
echo -n "Escribe algo por favor (AdioS para quitar) "<br />
read ENTRADA<br />
echo "Escribiste: $ENTRADA"<br />
done<br />
<br />
</syntaxhighlight><br />
<br />
=== Resultado ===<br />
<br />
<pre><br />
[rrc@Pridd BashClase]$ ./S10.sh <br />
Escribe algo por favor (AdioS para quitar) Hola<br />
Escribiste: Hola<br />
Escribe algo por favor (AdioS para quitar) Algo<br />
Escribiste: Algo<br />
Escribe algo por favor (AdioS para quitar) Más de una palabra<br />
Escribiste: Más de una palabra<br />
Escribe algo por favor (AdioS para quitar) Adios<br />
Escribiste: Adios<br />
Escribe algo por favor (AdioS para quitar) ADIOS<br />
Escribiste: ADIOS<br />
Escribe algo por favor (AdioS para quitar) AdioS<br />
Escribiste: AdioS<br />
[rrc@Pridd BashClase]$ <br />
</pre><br />
<br />
=== Explicación ===<br />
<br />
[[Category:Programación en Bash]]<br />
[[Category:CursoBash]]</div>
Rrc