Le Fri, 18 Mar 2011 01:39:17 +0100,
Jean-Marc Mongrelet <[email protected]> a écrit :
> Bonsoir,
>
> J'ai fait un petit script à la con:
> $ cat bin/image2ascii.sh
> #!/bin/bash
> url="$1"
> if [ "${url::1}" = '/' ]; then
> url="file:$url"
> fi
> shift
> curl -s "$url" | convert - jpg:- | jp2a - "$@"
>
> Se script fonctionne, mais mon problème est que je voudrais remplacer
> bash par sh...
> Et si je remplace bash par sh, j'ai un message d'erreur:
> $ image2ascii.sh
> http://blogue.biotope.ca/wp-images/google-chrome-logo.png
> /home/jean-marc/bin/image2ascii.sh:
> 5: Bad substitution
>
> Le problème vient apparemment de cette formulation: "${url::1}"
> qui ne passe pas en sh.
>
> Comment lui dire ?
>
> JM
bonjour,
dans le jeu des substitutions j'ai vu passer un sujet sur une
autre liste et indiquant cette url :
http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html
slt
bernard
-----------------------------------------------------------------
Les listes de diffusion du CULTe - Pour une informatique libre
http://www.CULTe.org/listes/
Pour se desabonner:
mailto:[email protected]?subject=Cliquez_sur_ENVOYER