Subject: | |
From: | |
Reply To: | |
Date: | Tue, 27 May 2003 13:21:04 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> I tried this "manually" in terminal
>
> Man cp >~/mydoc.txt
>
> But the result includes some "stuttering", so I'm wondering about the
> what
> would happen if I tried to use this with do shell script.
Doesn't your teletype machine understand that double characters
seperated by a ascii 8 are to be bolded?
This handler will correct the formating. Still a little strange around
the brackets. Hmmm.
man("cp")
on man(theCommand)
set t to do shell script "man " & theCommand
set the alphabet to
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-"
set d to ASCII character 8
repeat with C in characters of alphabet
set AppleScript's text item delimiters to C & d & C
set t to text items of t
set AppleScript's text item delimiters to (C as text)
set t to t as text
end repeat
set AppleScript's text item delimiters to ""
set t to text items of t
set AppleScript's text item delimiters to ""
return t as text
end man
On Wednesday, May 21, 2003, at 12:57 PM, Bruce Robertson wrote:
> CAT(1) System General Commands Manual CAT(1)
>
> N NA AM ME E
> c ca at t - concatenate and print files
>
> S SY YN NO OP PS SI IS S
> c ca at t [- -b be en ns st tu uv v] [- -] [_ f_ i_ l_ e _ ._ ._
> .]
>
> D DE ES SC CR RI IP PT TI IO ON N
> The c ca at t utility reads files sequentially, writing them to
> the
> standard
> output. The _ f_ i_ l_ e operands are processed in command line
> order.
> A single
> dash represents the standard input.
>
|
|
|