Re: [OT] UNIX heads; can I do this?
Re: [OT] UNIX heads; can I do this?
- Subject: Re: [OT] UNIX heads; can I do this?
- From: Emmanuel <email@hidden>
- Date: Thu, 14 Jun 2007 21:16:23 +0200
At 11:45 AM -0700 6/14/07, Philip Aker wrote:
extractcolumn 3 from f -- uses Satimage osax
That's a canard Emmanuel,
Firstly you've casually omitted several paragraphs of AppleScript
required to do the reads and writes.
This may me misleading. The line I wrote does read the file - no
additional paragraphs are required - and it returns the result that
the OP wanted to "get", which I think is pretty fair. Would the OP
have written "I want to make one of the column into a new file", I
would understand better what you say and, yes, writing to a new file
is way easier in the shell.
doing a "man -k xxx" is much more expedient than wading throught
AppleScript dictionaries.
AppleScript has better dictionaries than it used to have. Now they
may include arbitrary quantities of html, so we can hope they get
better. Users of the latest versions of Smile say they appreciate
that the dictionaries now include examples where needed.
For instance, the entry in Smile's dictionary we're talking about
("extractcolumn") displays the following example:
set f to alias "mypath:myfile.txt"
--get row indices and columns 1 and 2 from the file f, skipping the
three first rows:
set {C0, C1, C2} to extractcolumn {0, 1, 2} in f skipping 3 encoding
"ISO-8859-1"
which as far as I can judge is not less helpful than an average "man".
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden