Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Bash multiline command

Name: Anonymous 2009-07-29 5:09

[robert@haskal:~/5c] '
for (( i=0; i<5; i++ ))
do
echo "Hello $i"
done
'
bash:
for (( i=0; i<5; i++ ))
do
echo "Hello $i"
done
: command not found


Why doesn't it work?

Name: Anonymous 2009-07-29 5:16

>>1
because
this
is
how
you
multiline

Actually, it's because you are using bash.

Name: Anonymous 2009-07-29 5:16

Because you don't have /usr/bin/\nfor\ \(\(\ i=0\;\ i\<5\;\ i++\ \)\)\ndo\necho\ \"Hello\ \$i\"\ndone\n installed.

Name: Anonymous 2009-07-29 5:21

>>3
Huh. Makes sense, thanks.

Name: Anonymous 2009-07-29 22:58

for i in {0..4}; do echo "Hello $i"; done

Name: UMH memesmith 2009-07-29 23:08

>>1
robert@haskal
haskal
I see what you did there.

You're not getting away with this.

Name: Anonymous 2010-12-21 17:00

Don't change these.
Name: Email:
Entire Thread Thread List