From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 1-SEP-1992 11:52:16.33 To: info-vax@kl.sri.com CC: Subj: Re: at the risk of drawing severe flamage - q's about VMS/DC In <1992Aug31.094150.584@glas.rtsg.mot.com> waider@glas.rtsg.mot.com writes: > I'm currently working with a Unix system and will soon be returning (after > Christmas) to a VAX 8350 (8530??) running VMS 5.3 ish. What I want to know > is if the vanilla VMS comes with any feature resembling a Unix pipe? To any > who may be unfamiliar with the concept, it's a means of connecting the output > of one program/command directly to another so for instance, you could run a > file through sort to sort it and then put the output through a program to > throw away doubles; on Unix, this is simply a matter of piping sort's output > to the input of the second prog, while the only way I'm aware of on VMS to do > this would by to /OUTPUT=SYS$SCRATCH:TEMPFILE and then read TEMPFILE into the > next program. VMS 5.5 offers a POSIX-shell which is nearly (exactly?) an AT&T ksh, but it's awful slow... I think the best solution for you would be to use PIPE. PIPE is a pipe-emulator in DCL and works nearly the same way unix does. In my PIPE-distribution you will also find: sed, gawk, perl, grep, path-execution etc info.rz.uni-ulm.de (134.60.1.125) pub/VMS/misc Here an extract from the pipe-help: PIPE Syntax: PIPE [ tofile] [>>tofile] [ | ...] [ ; ...] allows one to combine DCL commands without worrying about temporary intermediate files, eg: $ pipe show user/full | catch m23 >m23.dat shows only users in M23 and stores it in file m23.dat PIPE will enter "interactive" mode if you type "$ PIPE" without arguments. When used in this way, it displays the "|" prompt, all input is processed by PIPE for operators, and doubling quotation marks ("") is not required. Additional information available: AFTER AWK CATCH COLUMNS COMBINE COUNT DIRECTORY DUPS ECHO F$ELEMENT EXTRACT F$EXTR F$ED FIL2DIR FIND GREP ITEM JUSTIFY LS MAKE NOCTRL NODUPS NOEMPTY MORE REPLACE REPORT SED SKIP SORT SPLIT TAIL TALLY TEE TOTAL TRIM UNIQ WC Debugging Examples Ideas Operators @TOOLS PIPE Subtopic? ex PIPE Examples PIPE allows: o combining DCL commands to operate data without worrying about temporary intermediate files, eg: $ pipe SHOW LOGICALS * |catch TT,TX |sort >dev.dat shows only logicals pointing directly to TT and TX devices o using wildcard filespecs for any command, eg: $ pipe dir *.FOR | +edit edits every .FOR file. The '+' switches the mode to 'execute with data as args' from the default 'execute with data as input'. o executing multiple commands sequentially, as in: $ pipe show users > OPA0: ;sho sys >OPA0: o redirecting output for programs which don't normally support this, eg: $ pipe auth sho brief * >aut.dat o more selective outputs from programs, eg: $ p show system |catch acp,symb show only ACPs and SYMBIONTs $ pipe SYSGEN SHO/ALL | catch LGI o an effective /CONFIRM option on commands that don't otherwise allow it (like COPY), eg: $ pipe dir foo*/exc:.exe | ?copy &LINE dua1:[archives] \ Ulli 'Framstag' Horlacher \ psi%0262450502601::rzmain::orakel \ \ Student consultant VAX/VMS and networks \ orakel@dulruu51.bitnet \ \ Rechenzentrum Universitaet Ulm Germany \ orakel@rz.uni-ulm.de \ \ "With mainframes you just can do nonsense, with PCs not even that." \