www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/13/06:01:05

From: "Georg Pohl" <PohlGeorg AT compuserve DOT de>
Newsgroups: comp.os.msdos.misc,comp.os.msdos.djgpp
Subject: Re: to pipe system variables other variables at command line
Date: Thu, 13 Jul 2000 11:06:39 +0200
Lines: 41
Message-ID: <8kk3p8$2kduc$2@ID-37833.news.cis.dfn.de>
References: <3957018F DOT 35C44125 AT gmx DOT de DOT de> <3959A07F DOT FB5A37A6 AT uclink4 DOT berkeley DOT edu>
NNTP-Posting-Host: 213.20.6.76
X-Trace: fu-berlin.de 963482218 2766796 213.20.6.76 (16 [37833])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
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?

Some week ago I published some free programs to modify environment
variables on my website.

    INPUT - get user input (keyboard or pipe)
    DATE_VAR - get date/time related variables
    ENV_STR - modify environment variables

At least one would solve your problem:

    DATE_VAR
    copy name.txt name%date%.txt

HTH
Georg Pohl

--
Email:   PohlGeorg AT compuserve DOT de
Website: http://www.online-club.de/~Eulenspiegel
         Freeware for DOS/Windows, C-Libraries
ICQ:     78600280


- Raw text -


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