home *** CD-ROM | disk | FTP | other *** search
-
-
- Z3TIPS06.LBR Bill Tishey 12/20/87
-
- I have compiled this series of notes/tips relating to ZCPR3 primarily from
- messages between users on Z-Node #3 (617-965-7259) and sysop Jay Sage. Jay
- graciously provided me his message base for the effort. Messages from other
- sources may also be included occasionally to expand on certain topics.
- --------------------------------------------------------------------------
-
- Alias Wildcarding
-
- 11/07/87... I use an alias called '.COM, consisting of sd $1*.$2* $*, on
- all three systems here. It allows me to type ' c<CR> to just see the files
- beginning with a 'c' on current DU:, or I can use more than one letter or
- number to narrow the search further yet. That alias also makes it possible
- to look at just a few files on another DU: where there are many. EX: my
- A15: on my 'play machine' contains 272 com files at the present, and if I
- only want to look at the files beginning with 'd' on A15: and am on B1:, I
- can type ' a15:d<CR> and the trick alias will show me all files on A15: that
- begin with a 'd'. (Ken Jones)
-
- 11/07/87... Expanding a bit on my ALIAS .com file '.COM, I have never
- seen anyone mention this capability before on any of the systems I call.
- I also have an alias ER.COM (ERA $1*.$2*) which makes it possible to type
- ER<CR> to ERA the complete DU: I'm on, OR use ER C D<CR> to just ERA the
- files beginning with a 'C' and ext beginning with a 'D'. No '.' is necessary
- between the 'C & D' because the alias (or ARUNZ, if the alias is in your
- ALIAS.CMD file) handles that correctly. You can use ER C DZ<CR> to get
- rid of crunched .DOC files etc. Unlimited possibilities for Z users and
- aliases or the ALIAS.CMD file. I would be interested in any trick ways
- others control their systems with aliases' passing parameters. (Ken Jones)
-
- 11/15/87... I will make the change you requested to the 'quote' alias,
- but I do not think the method you use is very good. If you look at the 'D'
- alias in the ALIAS.CMD file in A0: you will see how I do the same thing.
- The syntax is then the same as a standard command; asterisks are simply
- added to both the filename and filetype.
- On a more technical note, the syntax $1*.$2* $* does not
- make sense to me. Why do you have a $* on the end? It will only repeat
- the first two tokens over again! Do you mean $-2 instead?
- I would never have a wildcarding alias for a command like
- ERA. That is foolishly dangerous in my opinion. File erasing commands
- should require very deliberate entry. Can you imagine the little slipup
- of entering "ER F" when you meant "ERA F" to erase a single file and had
- all your files beginning with an F erased before you could do anything
- about it? (Jay Sage)
-
- 11/15/87... Yes, I have been caught one time in the past year with my
- ER.alias, (that was caused by staying up 30+ hours in front of this play
- toy with no sleep though, I think, I AGREE, you HAVE to pay attention when
- you use an ERA program.) If a user has THAT problem his (or her) system
- should probably be set up with ERA VERIFY 'on' so the system will ask
- you for each file to erase.
- I will have to check your ALIAS.CMD file out once again on
- parameter passing. (Ken Jones)
-
- 11/16/87... Jay, sorry, but in your ALIAS.CMD file you put ' SD $1*.$2.*
- $-2 instead of SD $1*.$2* $* . GEEEZ, that won't do ANYTHING correctly... but
- to work it HAS to be ' SD $1*.$2* AND and it WILL work as I stated earlier.
- Hitting ' a<CR> on your A0: will show files ALIAS.CMD, ALLFILES.DZR &
- APPLIC . Doing ' a c<CR> on your A0: will show ONLY ALIAS.CMD and FROM A0:
- doing ' b:d l<CR> will ONLY show (at 11:19pm Nov 15th) the files DBL4.LBR,
- DIF22.LBR on your B0: directory. Doing ' B:d<CR> will add the DT42.TZT to
- the above display. Please change my ' alias to SD $1*.$2* so it will work.
- You were correct that the 3rd parameter ($*) is NOT needed, thanks for
- bringing that to my attention. (Ken Jones)
-
- 11/17/87... Jay, never took the time before to REALLY SEE what my ALIAS'S
- were doing. Tonight I did, and learned something. My '.com ALIAS will NOT
- work correctly without being SD $1*.$2* $* because the way an ALIAS. or
- ARUNZ.cmd passes parameters. With it set to SD $1*.$2* you can [from ex:
- A0: type] ' b1:a l /l<CR> and it will look on B1: and show all the files
- beginning with A and ext beginning with L (maybe lBR's) but will NOT [with
- out the 3rd parameter $*] pass the /L to LIST out the .LBR files contents.
- So I looked at my ALIAS ER.com and tried it with ERA $1*.$2* $* and then a
- command of ER e c i<CR> to get rid of some test files starting with E and
- ext starting with C. Well, of all things, it will NOT work with $* as the
- 3rd parameter. It just ERA'ed all the E*.C* files...soooo, UNERA them
- and try ER $1*.$2* $3* and see. Now it works fine. Command of ER E C I
- <CR>ASKS for my OK on each file beginning with E and ext beginning with E
- since the 3rd parameter is turning on the QUERY mode of ERA! (Ken Jones)
-
- 11/17/87... Continuing on passing PARAMETERS: Question: Why will '.ALIAS
- work correctly with the 3rd parameter of $* as does UN.alias =[UNCRUNCH
- $1*.$2* $*]but ER.alias MUST have the 3rd parameter as $3* [in ERA $1*.$2*
- $3*] to work correctly? Why won't it pass the "I" as the 3rd parameter
- unless the 3rd parameter IS $3* instead of $* ? Answers from some of the
- Guru's out there in Z3.* land would be appreciated by some of us users
- that are lazy and don't want to type the WHOLE fn.ext to do something. I
- try to DL the ALIAS.CMD file whenever on a RAS, but remote ALIAS.CMD
- files by nature can not be as full of goodies as a private system such
- as the ALIAS.CMD file I have on my R & D Machine vs: the one I have on
- Z-node #4 for remote users. Thank you Jay Sage and ALL the others for
- Z3.3, It is GREAT! (Ken Jones)
-
- 11/17/87... Ken, the $* parameter in an alias script refers to the
- entire command tail. Thus, if you define your "e" alias as ERA $1*.$2* $*
- and say someting like: E C L I , what you'll get is ERA C*.L* C L I
- which is not exactly what you want, is it? What you should really use
- instead of $* is $-2 which is the command tail minus the first two tokens.
- (Howard Goldstein)
-
- --------------------------------------------------------------------------