Bash: Befehl X mal ausfuehren

[cc lang="bash"]for i in {1..10}
do
echo “Welcome $i times!”
done[/cc]

Falls ich das wieder vergessen sollte. Wichtig: GESCHWUNGENE Klammern!

Nachtrag auf Anfrage:
Der Einzeiler sieht dann so aus:
[cci lang="bash"]for i in {1..10}; do echo “Welcome $i times!”; echo “Noch ein Befehl”; done[/cci]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>