Re: Scripting Additions: Embracing the Horror of Unix
Re: Scripting Additions: Embracing the Horror of Unix
- Subject: Re: Scripting Additions: Embracing the Horror of Unix
- From: Shane Stanley <email@hidden>
- Date: Thu, 31 Jan 2002 21:26:35 +1100
On 31/1/02 5:47 PM +1000, Jon Pugh, email@hidden, wrote:
>
At 8:01 AM +1100 1/31/02, Shane Stanley wrote:
>
> All the unix experts seem to agree that the file commands in Jon's can be
>
> done using do shell script, for example, but not one of them seems willing to
>
> actually spell out how, despite repeated hints...
>
>
Hey, I don't tell you how to mind the sheep.
Careful; you're making the cattle restless...
>
I've got a paying job that keeps me plenty busy. ;)
>
>
cp, ditto, cpMac - copy files
>
mv - move files
>
rm - delete files
>
mkdir - make directory
>
rmdir - remove directory
>
ls - list files
>
ps - list processes
>
pwd - print working directory
>
cd - change directory
>
cat - display file
>
more - display file to a human
>
man - I wish there was a help command
>
>
Now you know as much unix as I do.
Actually, my hinting was to those who seem to know unix well, and claim it
as out savior. Maybe no-one's posted the handlers because they think it's
just too obvious or something. But it does seem a bit odd to me. Four
presumably simple handlers. But then...
>
>
At 9:21 AM +1100 1/31/02, Shane Stanley wrote:
>
> Jon: I want copyFile back ;-)
>
>
As the marketing weasels would say, "But what are you willing to pay for it?"
>
>
Economics rule my world these days, and Jon's Commands ain't paying the bills.
Fair enough. I guess I was talking of the idea in the abstract. But then I
had my own minor flash of light....
The four commands in question are copyFile, moveFile, renameFile and
deleteFile. Now, the first three of these didn't give us any extra
abilities. Their sole contribution, unless I'm mistaken, was performance --
they avoided the old Finder, and saved us growing old unnecessarily in the
process.
But the X Finder is much faster script-wise, by all accounts. So maybe --
and I hope someone will try this -- the need for them has disappeared simply
because the performance gap has disappeared, or shrunk to the point of
pointlessness for everyone not named Knapp. Maybe the Finder is effectively
passing them on to the innards in a spritely fashion anyway.
But that leaves deleteFile, the one I really miss. And that's because it
supplies extra functionality: the ability to bypass the Trash. That's a must
for scripts running on busy servers.
So why couldn't we do this via scripting the Finder anyway? I don't really
know, but my guess it was a sort of security thing: you couldn't do it via
scripting without adding in something extra, in which case all bets were
off.
If that's the case, then it's now pointless: it can be done via do shell
script anyway, so there's no security at all. In fact, by forcing those of
us who need it to dabble in something we're not at home with, you could make
a fair argument that not allowing the Finder to delete directly is, as of X,
increasing the risk.
So although I know I'm probably wasting my time, I'd love the Finder team to
add a suitable "with extreme prejudice" parameter to the Finder's delete
command.
And that might just get us all of Mr Pugh's back for a while, or at least
until I need a scripted screen dump...
--
Shane Stanley, email@hidden