Article View: es.comp.os.linux.programacion
Article #10429Re: [bash] test: too many arguments
From: marmolejo
Date: Wed, 06 Mar 2002 17:09
Date: Wed, 06 Mar 2002 17:09
41 lines
2359 bytes
2359 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 En el mensaje <slrna7vpjf.mlg.benjamin@lamanonegra.net.dhis.org> con fecha Fri, 1 Mar 2002 21:37:09 +0100, Benjam�n Albi�ana escribi�: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Estoy intentando hacer un script en bash que mire si hay ficheros en > un directorio, y si es as�, que los mueva a otro, y los pase por > otro script. Una vez hecho esto, que lance un programa. > - ----------------------------------------------------------------------- > #!/bin/bash > if test ! -z $(dir -1 /var/spool/news/failed.postings/) > then Yo combinar�a ls y wc as�: if [ $(ls -a /var/spool/news/failed.postings/|wc -l) -ne 2 ]; then Lo veo mucho m�s portable y tal ... - -- Yo secribo cautorcientas plabras por minuot - Debian GNU/Linux Sid Linux User #162799 - - PGP Pub Key en pgp.escomposlinux.org ID:0x320A57C2 - - marmolejo at escomposlinux dot es ICQ: 65833679 - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8hk1Fal36lDIKV8IRAnCiAJ4u0GvJNdZXfNhvaPe/tB+q2yn9agCfXfKr o5x41k7NJEOfB3DXGSF6ee4= =pi+n -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<slrna8cja2.gnc.marmolejo@localhost.localdomain>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!213-98-91-117.uc.nombres.ttd.ES!not-for-mailReferences:
<slrna7vpjf.mlg.benjamin@lamanonegra.net.dhis.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f86c8,f967119e962785f0 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-03-06 09:20:17 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!213-98-91-117.uc.nombres.ttd.ES!not-for-mail From: marmolejo <marmolejo@escomposlinux.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: [bash] test: too many arguments Date: Wed, 6 Mar 2002 17:09:26 +0000 (UTC) Organization: Ecolnet Lines: 41 Message-ID: <slrna8cja2.gnc.marmolejo@localhost.localdomain> References: <slrna7vpjf.mlg.benjamin@lamanonegra.net.dhis.org> Reply-To: marmolejo@escomposlinux.org NNTP-Posting-Host: 213-98-91-117.uc.nombres.ttd.es (213.98.91.117) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1015435216 12302013 213.98.91.117 (16 [63420]) X-Orig-Path: julieta.escomposlinux.org!antonio.escomposlinux.org!marmolejo.escomposlinux.org!not-for-mail User-Agent: slrn/0.9.7.2 (Linux)