[LUG.ro] Script

Germán Porta lugro@lugro.org.ar
Wed, 4 Jun 2003 18:08:15 -0300


joya maestros veo cuanta falta hace aprender a programar en el bash
Gracias andubo de pelos
----- Original Message -----
From: "Sebastián D. Criado" <scriado@ciudad.com.ar>
To: <lugro@lugro.org.ar>
Sent: Wednesday, June 04, 2003 5:50 PM
Subject: Re: [LUG.ro] Script


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Es que le estas mandando toda la linea que te deja el grep.
> Podrías usar awk de una forma muy simple
>
>  if [ ! `ifconfig | grep ppp1 | awk -F '  ' '{print $1}'` ]; then
>  {ejecuta algo}
>  fi
>
> Saludos.-
>
> El Miércoles 04 Junio 2003 17:07, Germán Porta escribió:
> > si pero eso me funciona solo en el caso que el programa se este
ejecutando
> > una sola vez y yo tengo dos interfaces usando pppd mi idea es la
siguiente:
> >
> > if [ ! `ifconfig | grep ppp1 ` ]; then
> > {ejecuta algo}
> > fi
> > pero me tira el siguiente error:
> >  [: too many arguments
> >
> > Espero que entiendan y gracias.
> >
> > ----- Original Message -----
> > From: "Sebastián D. Criado" <scriado@ciudad.com.ar>
> > To: <lugro@lugro.org.ar>
> > Sent: Wednesday, June 04, 2003 3:43 PM
> > Subject: Re: [LUG.ro] Script
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > >
> > > Muchas gracias Marcelo, eso pasa por confiar en la cabeza ;-)
> > >
> > > El Miércoles 04 Junio 2003 15:04, Marcelo Ramos escribió:
> > > > El(On) 04/06/2003 (14:00:26), Sebastián D. Criado escribió(wrote):
> > > > > Luego pones esto en el cron y listo.
> > > >
> > > > Pequeña corrección:
> > > >
> > > >         ! `pidof pppd`      <---- espacio entre ! y `pidof pppd`
> > > >
> > > >
> > > > Saludos.
> > >
> > > - --
> > > - --
> > > Sebastián D. Criado - scriado@ciudad.com.ar
> > > L.U.G.R.o - http://www.lugro.org.ar
> > > GNU/Linux Registered User # 146768
> > > - -------------------------------------------------------------------
> > > "Si el Universo fuera un programa estaría hecho en C, y correría sobre
> > > un sistema UNIX"
> > >                                                    Anónimo.
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.2.2 (GNU/Linux)
> > >
> > > iD8DBQE+3j3h8hmHQ8ZCg0IRAoGTAKCpkteC5FyE7s+TbqCK6LFUJWazPQCgp42z
> > > GKdfIGhNp5r6nA0BDxqtZ3k=
> > > =swJu
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > > _______________________________________________
> > > Lugro mailing list
> > > Lugro@lugro.org.ar
> > > http://www.lugro.org.ar/mailman/listinfo/lugro
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/03
> >
> > _______________________________________________
> > Lugro mailing list
> > Lugro@lugro.org.ar
> > http://www.lugro.org.ar/mailman/listinfo/lugro
>
> - --
> - --
> Sebastián D. Criado - scriado@ciudad.com.ar
> L.U.G.R.o - http://www.lugro.org.ar
> GNU/Linux Registered User # 146768
> - -------------------------------------------------------------------
> "Si el Universo fuera un programa estaría hecho en C, y correría sobre
> un sistema UNIX"
>                                                    Anónimo.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE+3luI8hmHQ8ZCg0IRAl6JAJ4gcLBsAOW84kXu4toi1KqPIo/H5wCfQ9lT
> XRnmOhePiXDxV0zOnhjI+oI=
> =49C5
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Lugro mailing list
> Lugro@lugro.org.ar
> http://www.lugro.org.ar/mailman/listinfo/lugro
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/03