Re: shell script with top "can't get terminal attributes"?
Re: shell script with top "can't get terminal attributes"?
- Subject: Re: shell script with top "can't get terminal attributes"?
- From: Christopher Nebel <email@hidden>
- Date: Sun, 10 Feb 2002 23:19:28 -0800
On Sunday, February 10, 2002, at 03:18 PM, James Sentman wrote:
In 10.1.2 I tried
do shell script "/usr/bin/top"
However this threw back
"can't get terminal attributes".
? Where can I find them? What should I tell it? What other arguments
are there?
Should I man the tops?
I'm not sure that you can run top, or other terminal apps with a more
complex interface from a faceless shell...
Half right -- you can't run it in its default mode, which not only gets
the terminal width, but also uses curses to do a live-updating display.
However, a quick look at the man page reveals the "-l" option, which
"switches from the default screen mode to a logging mode suitable for
saving the output to a file." Use 'do shell script "top -lw"' and
you'll be fine.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.