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,500 of 42,547   
   T to foxidrive   
   Re: How do I read a pipe inside a batch    
   18 Oct 16 15:04:09   
   
   From: T@invalid.invalid   
      
   On 10/18/2016 02:39 AM, foxidrive wrote:   
   > On 18/10/2016 18:48, T wrote:   
   >>   
   >> :-)   
   >>   
   >> 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   
   >   
   > There's an issue with batch scripting, and indeed in all programming,   
   > that program code is only effective to do the task that it is designed   
   > to do.   
   >   
   > Common sense, right.   
   >   
   > In batch code the language is so kludgy that small changes in the task   
   > can mean large changes in the code needed to perform that task.   
   >   
   >   
   > The upshot is that without a clear indication of the task that needs to   
   > be solved then many regulars that monitor batch forums and these usenet   
   > threads just even don't try to answer the non-question.   
   >   
   >   
   > The reason is that they need to answer it again when their first answer   
   > doesn't solve the actual task.   That wastes their time: and many of the   
   > readers have had their time wasted in this way hundreds+++ of times   
   > already.   
   >   
   >   
   > I hope that the reason I described that is clear to you.   
      
   I was hoping you tell me how to read stdin with batch   
      
   --- 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