• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: shell script with top "can't get terminal attributes"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: shell script with top "can't get terminal attributes"?
      • From: Charles Arthur <email@hidden>
References: 
 >Re: shell script with top "can't get terminal attributes"? (From: James Sentman <email@hidden>)

  • Prev by Date: Re: date 0
  • Next by Date: Since Apple Listens to this List...
  • Previous by thread: Re: shell script with top "can't get terminal attributes"?
  • Next by thread: Re: shell script with top "can't get terminal attributes"?
  • Index(es):
    • Date
    • Thread