• Welcome to Valhalla Legends Archive.
 

Batch File Question

Started by ProgGuy, January 02, 2004, 12:05 PM

Previous topic - Next topic

ProgGuy

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? :)

Spht

echo.? pause? Not sure what you're wanting to do.

CupHead

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.

Kp

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.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!