Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.os.unix > #8115
| Path | csiph.com!pasdenom.info!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-b.proxad.net!nnrp4-2.free.fr!not-for-mail |
|---|---|
| Newsgroups | fr.comp.os.unix |
| From | william <blop@no.spam> |
| Subject | Re: shells et opérations sur le texte |
| References | <uc2ai6$2dkat$1@dont-email.me> <uc57fv$tga$1@shakotay.alphanet.ch> |
| User-Agent | slrn/1.0.3 (Linux) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Date | 18 Sep 2023 21:04:59 GMT |
| Lines | 42 |
| Message-ID | <6508bb7b$0$2992$426a74cc@news.free.fr> (permalink) |
| Organization | Guest of ProXad - France |
| NNTP-Posting-Date | 18 Sep 2023 23:04:59 CEST |
| NNTP-Posting-Host | 78.202.182.75 |
| X-Trace | 1695071099 news-1.free.fr 2992 78.202.182.75:52792 |
| X-Complaints-To | abuse@proxad.net |
| Xref | csiph.com fr.comp.os.unix:8115 |
Show key headers only | View raw
On 2023-08-23, Marc SCHAEFER <schaefer@alphanet.ch> wrote:
> On Tue, 22 Aug 2023 14:43:50, Thomas <fantome.forums.tDeContes@free.fr.invalid> wrote:
>> fuseauHoraire="${fuseauHoraire:0:1} 10#${fuseauHoraire:1:2} *60*60"
>
> Il se peut que ce genre de "parameter expansions" ne soient pas du POSIX
> shell, mais du dialecte bash.
>
> Dans ce cas, mettre
>
> #! /bin/bash
>
> au début du fichier. (oui, j'aime bien l'espace et ça marche quand même,
> mais #!/bin/bash est plus classique).
>
> Dans le monde d'aujourd'hui, une dépendance à /bin/bash ne me semble pas
> bizarre. Il y a très longtemps, on écrivait plutôt du code shell
> simplifié pour la portabilité avec les UNIX un peu étranges. Ou on
> passait à Perl.
>
>> sur mon nouveau pc, avec Ubuntu 22, il dit "Bad substitution".
>> Si je supprime "#!/bin/sh -", ça marche. (cad, si je comprend bien, si
>> je reste explicitement en bash.)
>
> Ubuntu est basé sur Debian.
>
> Debian a le concept d'alternative, qui permet à l'administrateur système
> de décider si /bin/sh est un mini-shell très efficace et simplifié, ou
> le gros /bin/bash.
>
> Exemple ici:
>
> schaefer@reliant:~$ dpkg-divert --list | grep dash
> diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash
> diversion of /bin/sh to /bin/sh.distrib by dash
>
> /bin/sh est bien dash, pas bash.
Je suis assez partagé sur le fait d'utiliser un shell pour un autre.
En effet, si on met /bin/sh comme shell de script, est ce qu'il ne faut
pas s'assurer que le dit shell sh soit compatbilible sh ?
S'il s'agit d'un shell bash ne faudrait il pas mieux utiliser bash ?
Back to fr.comp.os.unix | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
shells et opérations sur le texte Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-08-22 14:43 +0200
Re: shells et opérations sur le texte Marc SCHAEFER <schaefer@alphanet.ch> - 2023-08-23 15:09 +0000
Re: shells et opérations sur le texte william <blop@no.spam> - 2023-09-18 21:04 +0000
Re: shells et opérations sur le texte Nicolas George <nicolas$george@salle-s.org> - 2023-09-18 21:25 +0000
Re: shells et opérations sur le texte pehache <pehache.7@gmail.com> - 2023-09-20 11:31 +0000
Re: shells et opérations sur le texte Nicolas George <nicolas$george@salle-s.org> - 2023-09-20 14:54 +0000
Re: shells et opérations sur le texte Christian Weisgerber <naddy@mips.inka.de> - 2023-08-23 15:18 +0000
Re: shells et opérations sur le texte Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2023-08-24 01:46 +0200
csiph-web