<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Bash%2FS19.sh</id>
	<title>Curso de Programación en Bash/S19.sh - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Bash%2FS19.sh"/>
	<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S19.sh&amp;action=history"/>
	<updated>2026-04-29T02:46:29Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S19.sh&amp;diff=2865&amp;oldid=prev</id>
		<title>Rrc en 05:18 18 nov 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Bash/S19.sh&amp;diff=2865&amp;oldid=prev"/>
		<updated>2011-11-18T05:18:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
* [[:#S19.sh | S19.sh]]&lt;br /&gt;
** [[:#Resultado | Resultado]]&lt;br /&gt;
** [[:#Explicación | Explicación]]&lt;br /&gt;
&lt;br /&gt;
== S19.sh ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line=&amp;quot;GESHI_FANCY_LINE_NUMBERS&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
agrega_usuario()&lt;br /&gt;
{&lt;br /&gt;
  USUARIO=$a;   PWD=$b;   GCOS=$c&lt;br /&gt;
  echo &amp;quot;Agregando el Usuario $USUARIO ...&amp;quot;&lt;br /&gt;
  echo &amp;quot;useradd -c $GCOS $USUARIO&amp;quot;&lt;br /&gt;
  echo &amp;quot;passwd $USUARIO $PWD&amp;quot;&lt;br /&gt;
  echo; echo&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
### Inicio del script... Uso: ./S18 NuevosUsuarios&lt;br /&gt;
while read a b c&lt;br /&gt;
  do&lt;br /&gt;
    agrega_usuario&lt;br /&gt;
done &amp;lt; $1&lt;br /&gt;
### Fin del script...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resultado ===&lt;br /&gt;
 &lt;br /&gt;
 [rrc@Pridd BashClase]$ ./S19.sh NuevosUsuarios &lt;br /&gt;
 Agregando el Usuario Hector ...&lt;br /&gt;
 useradd -c &amp;quot;Hector Garcia Martinez&amp;quot; Hector&lt;br /&gt;
 passwd Hector HectorPass&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Agregando el Usuario Roberto ...&lt;br /&gt;
 useradd -c &amp;quot;Roberto Gonzalez Espinoza&amp;quot; Roberto&lt;br /&gt;
 passwd Roberto RobPass&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Agregando el Usuario Ronaldo ...&lt;br /&gt;
 useradd -c &amp;quot;Ronaldo Sanchez Orozco&amp;quot; Ronaldo&lt;br /&gt;
 passwd Ronaldo RonPass&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 [rrc@Pridd BashClase]$ cat NuevosUsuarios&lt;br /&gt;
 Hector HectorPass &amp;quot;Hector Garcia Martinez&amp;quot;&lt;br /&gt;
 Roberto RobPass &amp;quot;Roberto Gonzalez Espinoza&amp;quot;&lt;br /&gt;
 Ronaldo RonPass &amp;quot;Ronaldo Sanchez Orozco&amp;quot;&lt;br /&gt;
 [rrc@Pridd BashClase]$ &lt;br /&gt;
&lt;br /&gt;
=== Explicación ===&lt;br /&gt;
&lt;br /&gt;
[[Category:Programación en Bash]]&lt;br /&gt;
[[Category:CursoBash]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>