From: johnsd2@vccsouth07.its.rpi.edu (Daniel Norman Johnson)
Newsgroups: comp.sys.mac.advocacy
Subject: Re: More Defense of CLI  (there, I changed the subject ... )
Date: 5 Oct 92 16:42:46 GMT
Article-I.D.: rpi.d_rzp_#
Reply-To: johnsd2@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.

In article <1992Oct05.031819.26841@NeoSoft.com>, peter@NeoSoft.com (Peter da Silva) writes:
|> In article <9aqzm-g@rpi.edu> johnsd2@rpi.edu writes:
|> > I believe ya. :) But lets see what shortcuts you have the Mac GUI
|> > doesn't have also. (well, if you can look at Unix, I can look at
|> > de Mac, no?)
|> 
|> find /usr/spool/news/comp/unix/shell -print |
|> 	while read number
|> 	do smail johnsd2@rpi.edu < $number
|> 	done
|> 
|> > |>  There's also a UNIX
|> > |> command which can determine the type of a file (C code, PostScript,
|> > |> digitized sound, etc.) by its *content*.  Naturally the command is
|> > |> extensible to handle new file formats as they come along).
|> 
|> > A bit of a hack. The system should just _know_, without having
|> > to be asked politely to go figure it out. I wouldn't
|> > call this a feature.
|> 
|> Yes, the system should know. The Mac doesn't... it just knows what the
|> application that created it was. This is *similar*, but not the same.

You are incorrect.

The macintosh knows 2 things, the creator adn the type. Both must
be registered with Apple (yay); If you double-click on it,
it tries to use the creator application. If this isn't present,
it doens't work (there are some special cases tho)

It also keeps a type, which lets it distinguish files based on whats in
them. That's how it knows what you can drag&drop onto what. IT also
knows that it can use teachtext to open 'TEXT' and 'PICT' files.

Ideally, it would find an app on your hard drive that could open
the appropriate type if such existed, but it doens't have this
feature yet. :(

|> > |> there are commands like "find" which let me apply a command to  
|> > |> whatever list of files the command finds.  I can easily tell the find
|> > |> command to apply the print command to all the C files which      
|> > |> are owned by me, readable by others, modified in the last 10 days,    
|> > |> and which don't have any syntax errors, for example.
|> 
|> > I'd love to see the command that did THAT! :)
|> 
|> find . -name "*.c" -perm "-4" -mtime "-10" -exec cc -c "{}" ";" \
|> 	-exec "lpr" "{}" ";" > /dev/null

Hey, that's annother one!

|> > In any case this can also be achieved by drag+drop type apps,
|> 
|> Yeh, but you have to write the app first. Does it exist?

Nope, buts its close. The finder's find command can do part of this.
I must remind you that these commands you are using are really just
programs lying around. Its very nice you have good ones, but it
says exactly nothing about GUI vs CLI.

|> > However, this technique does requires you to prod it along
|> > at each step;
|> 
|> Yes, that's the point. I can't type a command and let it crunch. Right now
|> I've got a script at work converting sagans of lines of PL/M to C. Hate to
|> have to do that on a Mac.

Yeah, Macs dont have scripts. :( they should.

But I see that as distinct from CLIs (tho they can be and usually
are combined)

|> > Most of this is indeed inapplicable, so you can count it as a "Feature"
|> > if you like. Id say it was trying to make up from the obnoxious nature
|> > of the CLI.
|> 
|> Repeat last command would be a nice one. How would you repeat (say) a print
|> command, with all options the same, on a different file?

Depends on the options. The simples way is to select htem all and then
use the print command. That way you get one print dialog; set up the options
and it prints them all. Unfortunately, this only works if they are
all created by the same app. :( It didn't have to be that way. Apple
shoulda known better. :(

But in this case your CLI becoms rather more diffuclt, since
you have to tell a different program to print it (unless
of course they are all in one format- presumably text.)

Of course, in some cases you could just select the new file
and "print" and watch it go, but thats if the options were printer
and not document specific. So that often will not count.
--
			- Dan Johnson
And God said "Jeeze, this is dull"... and it *WAS* dull. Genesis 0:0

These opinions have had all identifiying marks removed, and are untraceable.
You'll never know whose they are.
Newsgroups: comp.sys.mac.advocacy