Hallo ich bräuchte als Script-Dummy Hilfe von einem "Profi"
Ich habe folgendes Script mit notepad++ (Kodierung UTF 8 ) geschrieben:
#!/bin/bash
wdhl=10
i=0
while [ $i <= $wdhl ]
do
echo $i hhhh;
$i++;
done
Hex:
ef bb bf 23 21 2f 62 69 6e 2f 62 61 73 68 0d 0a
77 64 68 6c 3d 31 30 0d 0a 69 3d 30 0d 0a 77 68
69 6c 65 20 5b 20 24 69 20 3c 3d 20 24 77 64 68
6c 20 5d 0d 0a 64 6f 0d 0a 20 65 63 68 6f 20 24
69 20 68 68 68 68 3b 0d 0a 20 24 69 2b 2b 3b 0d
0a 64 6f 6e 65
Auf der Box gespeichert und int telnet gestartet und folgende Meldung erhalten:
root@dm8000:~# sh /etc/tuxbox/config/Test/Test.sh
: not found/config/Test/Test.sh: line 1: #!/bin/bash
/etc/tuxbox/config/Test/Test.sh: line 8: syntax error: unexpected "done" (expect
ing "do")
root@dm8000:~#
Bei Speicherung des Scrips als UTF ohne BOM erhalte ich folgende Fehlermeldung:
root@dm8000:~# sh /etc/tuxbox/config/Test/Test.sh
/etc/tuxbox/config/Test/Test.sh: line 8: syntax error: unexpected "done" (expect
ing "do")
root@dm8000:~#
Was mache ich falsch?
forumCluberer
[Edits] Rechtschreibfehler behoben