www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/26/14:16:07

From: Outsider <nonvalid_email AT yahoo DOT com>
Newsgroups: comp.os.msdos.misc,comp.os.msdos.djgpp
Subject: Re: to pipe system variables other variables at command line
Date: Mon, 26 Jun 2000 18:56:14 +0200
Organization: 'From' address is nonvalid, use 'Reply-To' address for email
Lines: 37
Message-ID: <39578B2E.3FB14104@yahoo.com>
References: <3957018F DOT 35C44125 AT gmx DOT de DOT de>
NNTP-Posting-Host: kob-khk-1-5.dsl.cybercity.dk
Mime-Version: 1.0
X-Trace: news.cybercity.dk 962038442 58011 212.242.128.145 (26 Jun 2000 16:54:02 GMT)
X-Complaints-To: abuse AT cybercity DOT dk
NNTP-Posting-Date: 26 Jun 2000 16:54:02 GMT
X-Mailer: Mozilla 4.08 [en] (Win16; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Stephan Rink wrote:
> 
> I like to pipe a system variables to another variable at a MS DOS shell
> without using a file.
> At the command line it should look like this
> 
> C:> var1 < date /t                                // this will cause an
> error
> C:> copy name.txt name%var1.txt
> or
> C:> set var1= | date /t                         // this will show only
> the date
> C:> copy name.txt name%var1.txt
> 
> How can I submit the output of a command to a Variable?
> 
> Stephan

There are *many* ways to do this. Unfortunately, most methods I know
will likely not work in NT, and I have no idea which ones will.
You may want to ask this in news:alt.msdos.batch.nt

Here is my favorite method:

@ECHO off
:: author: Herbert Kleebauer
@echo jP[h01X-00P_j AT X(E.(E9,`,`0E50E:h02X500YQ2O0IIxKZR2W2CM!Iy5C>%temp%.\echoit.com
%temp%.\echoit aaaa  %demo line%
%temp%.\echoit bbbb  %demo line%
::


-- 
Outsider
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
"The irony of the Information Age is that it has given new
respectability to uninformed opinion." --John Lawton,

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019