Valhalla Legends Archive

Programming => General Programming => Topic started by: ProgGuy on January 02, 2004, 12:05 PM

Title: Batch File Question
Post by: ProgGuy on January 02, 2004, 12:05 PM
I want to send a carriage return to the same batch file that I'm currently running. This is for after I send a password, and need to press enter for the password to be accepted. I've read that pipeing ("|") works to send stuff like this to another program/batch file, but not to the same batch file.

Would anyone know how to do this? Or even know what I'm talking about? :)
Title: Re:Batch File Question
Post by: Spht on January 02, 2004, 12:14 PM
echo.? pause? Not sure what you're wanting to do.
Title: Re:Batch File Question
Post by: CupHead on January 02, 2004, 02:24 PM
Piping sends the output of one command into another as a parameter (I think).  If you want to store the output in a file, use the > operator.  So PrintStuff > MyFile.txt will redirect whatever output PrintStuff has into MyFile.txt.
Title: Re:Batch File Question
Post by: Kp on January 02, 2004, 02:31 PM
Quote from: CupHead on January 02, 2004, 02:24 PM
Piping sends the output of one command into another as a parameter (I think).

You're thinking of backticks, and then only on certain command interpreters.  Piping attachs stdout of the source process to stdin of the destination process.  For instance, ls -l | grep foo requests a long listing with ls -l, then feeds all that ls -l prints into grep, which is told to look for 'foo'.  grep reads its input and prints lines which contain foo.