[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Petit conseil de Programmation [ Script Shell + Ruby ]



Marc Chantreux wrote:
On Wed, Apr 30, 2008 at 03:35:00PM +0200, Xadawa wrote:
for f ($( get|examples )) { get $f > $f }
La dernière ligne avec le for ne marche pas... Il me met une erreur de parenthèses...

c'est que tu n'utilises pas encore zsh :)

en attendant, tu dois tapper
for f in ($( get|examples )); do get $f > $f; done

marc
ps: s'inscrire a shell[at]asyd.net ou ssfr

root@laptop-acer:~/examples # get () { curl http://www.fifi.org/doc/dialog/examples/$1 }; examples() { perl -lne 'print $1 while m{<a href="(.*)">\1</a>}g'}; for f in ($( get|examples )); do get $f > $f; done
bash: syntax error near unexpected token `('


Reply to: