• 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: Chris Espinosa <email@hidden>
  • Date: Mon, 11 Feb 2002 12:55:45 -0800

On Monday, February 11, 2002, at 08:00 AM, Charles Arthur <email@hidden> wrote:

More generally, though, as one who's excited by this big hinterland
discovered in /usr/bin/ and /usr/sbin/ - in fact is standing there staring
like stout Cortez with eagle eyes and a wild surmise on this Pacific of
software - how does one find out what the hell all those programs *do*, and
which is the right one to do whatever with?

Is there a ready reference out there, or even buried OMM?


set theRoot to POSIX path of (path to startup disk)
repeat with theBin in {"usr/bin/", "usr/sbin/"}
repeat with theCommand in (list folder (POSIX file (theRoot & theBin)))
set theManPage to do shell script ("man " & (paragraph 1 of theCommand) & " | colcrt -")
if theManPage does not start with "man: no entry for" then
tell application "TextEdit"
make new document at end of documents
set name of document 1 to (paragraph 1 of theCommand) as string
set every text of document 1 to theManPage
end tell
end if
end repeat
end repeat

This illustrates the general principle; alter as you wish. Be ready with command-period.

Chris (E.)
_______________________________________________
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.

  • Prev by Date: Re: Since Apple Listens to this List... [Case Statements]
  • Next by Date: Re: shell script with top "can't get terminal attributes"?
  • Previous by thread: Re: shell script with top "can't get terminal attributes"?
  • Next by thread: Outlook Express: deleting HTML
  • Index(es):
    • Date
    • Thread