PDA

View Full Version : 5.2 release candidate w/ firmware v.26



Michael Bowyer
2004-06-22, 12:56
Dave, sorry about this.... this list messes up your line, so I have to
copy/paste via textedit and delete the new lines!

Here is the output, first time without the system prefs running, second
time time with. First time the command exists and returns the prompt,
second time (system prefs running) I get the too many arguments.
Obviously, system prefs isn't closed!



sh-2.05b$ if [ z`ps -axww | grep "System Preferences" | grep -v grep |
cat` != z ] ; then osascript -e "tell application \"System
Preferences\" to quit"; fi
sh-2.05b$ if [ z`ps -axww | grep "System Preferences" | grep -v grep |
cat` != z ] ; then osascript -e "tell application \"System
Preferences\" to quit"; fi
sh: [: too many arguments
sh-2.05b$

Dave Nanian
2004-06-22, 13:50
Nah, that's totally my fault when I sent the command, I forgot to quote
something. That's OK. Try this:

if [ z"`ps -axww | grep "System Preferences" | grep -v grep | cat`" !=
z ] ; then osascript -e "tell application \"System Preferences\" to
quit" ; fi

But, this doesn't seem to be telling us anything: the first (no system
preferences) case seems to have succeeded, and since that's the case
you're dealing with, it returns no error and should continue without
trouble.

When this hang happens, does anything appear in the console?

On Jun 22, 2004, at 3:56 PM, Michael Bowyer wrote:

> Dave, sorry about this.... this list messes up your line, so I have to
> copy/paste via textedit and delete the new lines!
>
> Here is the output, first time without the system prefs running,
> second time time with. First time the command exists and returns the
> prompt, second time (system prefs running) I get the too many
> arguments. Obviously, system prefs isn't closed!
>
>
>
> sh-2.05b$ if [ z`ps -axww | grep "System Preferences" | grep -v grep |
> cat` != z ] ; then osascript -e "tell application \"System
> Preferences\" to quit"; fi
> sh-2.05b$ if [ z`ps -axww | grep "System Preferences" | grep -v grep |
> cat` != z ] ; then osascript -e "tell application \"System
> Preferences\" to quit"; fi
> sh: [: too many arguments
> sh-2.05b$
>
>
>