Path: utzoo!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.sys.ibm.pc Subject: Re: More John Dvorak comments Message-ID: <12085@steinmetz.ge.com> Date: 7 Sep 88 18:25:08 GMT References: <18509@neabbs.UUCP> <24516@bu-cs.BU.EDU> <31930@clyde.ATT.COM> <6414@chinet.UUCP> <9837@bellcore.bellcore.com> <1028@mtund.ATT.COM> <1185@plx.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 36 In article <1185@plx.UUCP> walt@plx.UUCP (Walt Novinger (sales)) writes: | Why write script files? Seems to me that most *IX commands can be | mapped nearly 1:1 with DOS (e.g. ls:dir, cp:copy). Simply create a | link to perform the mapping. To link a dir command to ls, for instance, | simply become su and give the command "ln /usr/bin/ls /usr/bin/dir". | From then on, typing "dir *" will list the current directory (sorted, | even!),. the advantage of this approach is that no extra disk space | is used for a script (though I *think* one inode may be used). I think you're going to want to do it using aliaii or shell functions, particularly the COPY. When someone types COPY subdir/A.DOC subdir/B.DOC they want to create a file called B.DOC which is a copy of the contents of A.DOC, and delete any current B.DOC. When they type COPY subdir/*.DOC they want to copy all .DOC files into the current directory. Since the UNIX name expansion causes both commands to look the same at the time the program gets them, I don't see any really safe way to duplicate the DOS syntax and get the expected result. If you never forget to say COPY subdir/*.DOC . it will work. Most of the other things can be done with an alias, although if you have functions you can add a bit of error checking as you go. If the user uses a \ instead of a / it may cause problems, depending where it happens. What you probably want is "dsh" the DOS shell, which is a different shell interface featuring weak, ugly commands, one per line. I've seen it around, and there was a version on _The Store_ for the unix-pc, although I'm not sure if that was a program or a set of ksh macros. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me