Path: utzoo!utgpu!watmath!clyde!att!ihlpf!straka From: straka@ihlpf.ATT.COM (Straka) Newsgroups: comp.sys.mac Subject: Re: Mac Interface v. "Command Line" interface debates Message-ID: <7133@ihlpf.ATT.COM> Date: 5 Jan 89 14:10:48 GMT References: <15213@mimsy.UUCP> Reply-To: straka@ihlpf.UUCP (55223-Straka,R.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 68 In article <15213@mimsy.UUCP> folta@tove.umd.edu.UUCP writes: >There are several threads swirling around the Mac interface issue, so I >may be confused, but I think we might need to clarify what we mean by >"command line interface", as somehow opposed to the Mac interface. > >2. Having a UNIX-like shell. > >But issue 2 is involved. Obviously, a shell command-line interface is >useful for certain, concrete reasons. What are they? Maybe we could get >some concrete comments here, beyond "It is faster" (e.g. what is meant >by "it"?). > >At work/school, I have used UNIX on platforms from Suns to Crays. At >home, I have owned an IBM and an Amiga, but I now use Macintosh >exclusively. My observations are: > >1. The shell allows you to "move" faster, e.g. with > "cd /usr/folta/src/proj1". You don't have to move from folder to > folder, as on the Mac. Setting $CDPATH is a real help, too. (minor point) > >2. The shell allows you to have shell scripts, which automate repetitive > tasks. This is the real advantage, but not only repetitive tasks can be automated. The Bourne and Korn shells give you full programmability with control flow constructs, the ability to pass parameters, functions, IPC, recursion, the ability to fake keyboard input where needed (with some restrictions), the ability to modify your OS environment, ... I have seen the shell used as a prototyping environment for entire projects. For quick, effective hacks, it is quite powerful, especially when hacking around automated edits on tabular data, ... For these reasons, I consider the MS-DOS command line interface "All the arcane syntax that UNIX gives you, but with none of the power." > >3. The shell allows you to use pipes. E.g. > "cat x y z | sort | uniq | pr | lpr". Yes, the concept of generalized IO (stdio and named pipes) offers a wealth of options for hacking on data. The uses are not limited to printing either. For instance, I use the 2 following (and not too conceptually hairy, either) shell scripts to log the disk space on my login's file system once per day (from within my .profile), and then plot it out (on request only) on VersaTerm's 4014-graphics emulator. This sort of thing can be incredibly powerful. (note: PARNAME is the name of your login's file system.) ---------------------------------------------------------------------- #rdfout: plot free disk space with time cut -c35-40 $HOME/misc/${PARNAME}rdf.out|plot |td #rdflog: log free space in login's file system if grep "`date '+%h \{1,\}%d'|tr -d "[0*1]"`" $HOME/misc/${PARNAME}rdf.out 1>/dev/null 2>/dev/null then echo else date >>$HOME/misc/${PARNAME}rdf.out df|grep ${1}|tee rdf.tmp;cat rdf.tmp >>$HOME/misc/${PARNAME}rdf.out;rm rdf.tmp fi ---------------------------------------------------------------------- -- Rich Straka att!ihlpf!straka Avoid BrainDamage: MSDOS - just say no!