home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,498 of 42,547   
   T to foxidrive   
   Re: How do I read a pipe inside a batch    
   18 Oct 16 00:48:48   
   
   From: T@invalid.invalid   
      
   On 10/18/2016 12:06 AM, foxidrive wrote:   
   > On 18/10/2016 17:53, T wrote:   
   >> and put it into a variable?   
   >>   
   >   
   > Is this a lead pipe, or a nicer copper pipe?   
   > How did it get into the batch file?   
   >   
   >   
   > You could try this to get a pipe into a variable but what you want to do   
   > is not all that clear:   
   >   
   > set "variable=|"   
      
      
   :-)   
      
   echo abc | EchoThePipe.bat   
      
   the output should be "abc".   
      
   I want to take the text sent to the pipe and place   
   it into a variable so I can work on it.   
      
   Here is an example from bash script:L   
      
   $ ls  | grep wine   
   wine   
      
   $ ls -a  | grep wine   
   wine   
   .wine   
   .wine.10-16-2015   
   .wine.backup   
   .wine.smartsuite   
   .winetmp   
   .winetrickscache   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca