Veröffentlicht 30. August 200223 j Hallo zusammen, ich habe ein kleines Skript geschrieben für die Shell. Ich bekomme immer die Fehlermeldung argument expected. while [ $message != "Handling requests from UI clients on port 3572" ] do echo hallo sleep 30 message=`tail logs.txt | grep "Handling requests from UI clients on port 3572"` export message done[/code]Sieht jemand den Fehler? Frank
30. August 200223 j diese Fehlermeldung kommt bei mir - ich weiß nicht ob das dir was hilft? ... schlaubi@home:~> while [ $message != "Handling requests from UI clients on port 3572" ] > do > echo hallo > sleep 30 > message=`tail logs.txt | grep "Handling requests from UI clients on port 3572"` > export message > > done [: !=: unary operator expected
30. August 200223 j versuchs einfach mal damit: code: #! /bin/bash while test "$message" != "Handling requests from UI clients on port 3572"; do echo hallo sleep 30 message=$(tail logs.txt | grep "Handling requests from UI clients on port 35 72") export message done bzw. while [ "$message" != "Handling requests from UI clients on port 3572" ] do echo hallo sleep 30 message=`tail logs.txt | grep "Handling requests from UI clients on port 3572"` export message done du musstest einfach nur bei deiner Variablen $message zwei Hochkommas hinsetzen!
30. August 200223 j Original geschrieben von palvoelgyi while [ $message != "Handling requests Das $message musst Du so schreiben "$message"
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.