Deutsch   English   Français   Italiano  
<8735jhxx27.fsf@universite-de-strasbourg.fr.invalid>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!Faqf6A55NG1s8DSVkh3L9A.user.46.165.242.75.POSTED!not-for-mail
From: Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid>
Newsgroups: fr.comp.os.unix
Subject: Re: script sh / redirection de sorties
Date: Thu, 17 Mar 2022 01:05:52 +0100
Organization: =?utf-8?Q?Universit=C3=A9?= de Strasbourg
Message-ID: <8735jhxx27.fsf@universite-de-strasbourg.fr.invalid>
References: <fantome.forums.tDeContes-25D9C4.22524216032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: gioia.aioe.org; logging-data="43140"; posting-host="Faqf6A55NG1s8DSVkh3L9A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:kEmJLyESFIp9RfLwSgmodw2h8yk=
Bytes: 1929
Lines: 38

Thomas <fantome.forums.tDeContes@free.fr.invalid> writes:

> 1)
> d=C3=A9j=C3=A0 pour me rep=C3=A9rer :
>
> sur mon vieux mac :
> + sh --version
> GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
> Copyright (C) 2007 Free Software Foundation, Inc.
>
> sur Ubuntu 16.4 :
> $ sh --version
> sh: 0: Illegal option --
> $ man sh
> NAME
>      dash -- command interpreter (shell)
>
> y a-t-il moyen de connaitre la version ?

dpkg -s dash (la ligne Version donne <version-upstream>-<version-ubuntu>)

> 2)
> redirection de sorties :
>
> je souhaite rediriger stdout et stderr dans le m=C3=AAme fichier.
>
> sur mon vieux mac, je faisais :
> ( commande ) &> "fichier.log" &
> et =C3=A7a marchais tr=C3=A8s bien.
>
> sur Ubuntu 16.4, =C3=A7a ne marche pas.
>
> - pourquoi ?
> - comment faire ?

- c'est pas Posix
- on fait : ... 1> fichier.log 2>&1 ...

-- Alain.