Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.os.unix > #7917
| From | Thomas <fantome.forums.tDeContes@free.fr.invalid> |
|---|---|
| Newsgroups | fr.comp.os.unix |
| Subject | Re: script sh / redirection de sorties |
| References | <fantome.forums.tDeContes-25D9C4.22524216032022@news.free.fr> <8735jhxx27.fsf@universite-de-strasbourg.fr.invalid> |
| Date | 2022-03-17 02:27 +0100 |
| Message-ID | <fantome.forums.tDeContes-1C229B.02274317032022@news.free.fr> (permalink) |
| Organization | Guest of ProXad - France |
In article <8735jhxx27.fsf@universite-de-strasbourg.fr.invalid>, Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> wrote: > Thomas <fantome.forums.tDeContes@free.fr.invalid> writes: > > > 1) > > déjà pour me repérer : > > > > 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>) merci :-) (j'ai l'impression que tu n'en as pas besoin, dis moi si je me trompe.) > > > 2) > > redirection de sorties : > > > > je souhaite rediriger stdout et stderr dans le même fichier. > > > > sur mon vieux mac, je faisais : > > ( commande ) &> "fichier.log" & > > et ça marchais très bien. > > > > sur Ubuntu 16.4, ça ne marche pas. > > > > - pourquoi ? > > - comment faire ? > > - c'est pas Posix ok > - on fait : ... 1> fichier.log 2>&1 ... c'est bête qu'on doive en mettre de chaque coté du nom du fichier, y a-t-il un moyen plus compact, du genre : ... 2>&1 1> fichier.log ... ? (intérêt : remplacement automatique avec moins de risque de se tromper ou d'en oublier, par ex) merci bcp :-) -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/
Back to fr.comp.os.unix | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
script sh / redirection de sorties Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-03-16 22:52 +0100
Re: script sh / redirection de sorties Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-03-17 01:05 +0100
Re: script sh / redirection de sorties Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-03-17 02:27 +0100
Re: script sh / redirection de sorties Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-03-17 15:16 +0100
Re: script sh / redirection de sorties Nicolas George <nicolas$george@salle-s.org> - 2022-03-17 15:02 +0000
Re: script sh / redirection de sorties Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-03-17 19:10 +0100
Re: script sh / redirection de sorties Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-03-19 16:28 +0100
Re: script sh / redirection de sorties Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-03-19 23:44 +0100
csiph-web