Hi, ich habe mir ein kleines Skript angefungen: ,----[ test.sh ]- | #! /bin/sh | | ps aux > .tmp | running="FALSE" | cat .tmp | grep "java" | while read line | do | running="TRUE" | echo $running | done | echo $running | rm .tmp `---- Die Ausgabe lautet dann z.B.: ,----[ out ]- | TRUE | FALSE `---- Das TRUE kommt aus der Schleife, das FALSE danach. Ich wollte noch ein if [[ $running = "TRUE" ]] ; then ... dranhängen, aber das kommt ja nie durch!? Ich bin's immer gewöhnt, das die Sichtbarkeit einer globalen Variable (ich nenn $running jetzt mal so), auch immer so ist, aber running in der Schleife ist scheinbar ein anderes running als ausserhalb. Wie komm ich an den Wert ran? Ciao Sascha -- http://www.livingit.de linux at programmers-world dot com http://www.mobile-bookmarks.info http://www.programmers-world.com Famous last words: (1) Don't unplug it, it will just take a moment to fix. (2) Let's take the shortcut, he can't see us from there. (3) What happens if you touch these two wires tog-- (4) We won't need reservations. (5) It's always sunny there this time of the year. (6) Don't worry, it's not loaded. (7) They'd never (be stupid enough to) make him a manager.