[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Redirection sous bash
On Thu, Jan 13, 2000 at 04:06:28PM +0100, Ludovic Kuty wrote:
> Est-ce qqn pourrait me dire comment je peux spécifier
> dans un script bash que toutes les sorties vers stdout doivent
> être redirigées vers un fichier ?
> Cela pour éviter de devoir rediriger chaque commande individuellement (> fichier 2>&1).
Tu dois les mettre entre { }
p.ex.:
{ echo foo; echo blah; } > spam
ou bien:
{
echo foo
echo blah
} > spam
(ce qui est syntaxiquement équivalent)
--
-o) / Pascal Bleser ATOS Payment Systems|
/\\ \ C++/UNIX Development Aachen, Germany|
_\_v \<guru@linuxbe.org> <pbleser@atos-group.com>|
---------------------------------------------------|
Man usually avoids attributing cleverness to :
somebody else -- unless it is an enemy. :
-- Albert Einstein :
---------------------------------------------------'
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.
Archive of the list: http://tania.be.linux.org/