piping into set /p

  • Thread starter Thread starter Liviu
  • Start date Start date
That'd be like using heavy machinery to sink a nail ;-) Plus, the only
thing guaranteed to exist (and be enabled) on every windows is,
unfortunately, cmd.

Not true. cmd itself can be disabled on machines. :)
 
Al said:
For one simple example, how often have you seen this kind of thing in a
batch script:

type y.txt | {some-command}

where "some-command" was a built-in command that requires the user to
confirm an action by entering "y" followed by a carriage-return? I see this
in installation scripts that include the y.txt file, but sometimes it is
created on the fly. It seems to me always better to do this:

echo/y | {some-command}

I don't see this very often at all. I am annoyed when I see the ECHO Y
version used where a command has it's own /y switch. ISTM when I see this
syntax these days, I assume these are by people who are learning/clipping
batch code from a DOS website instead of more appropriately related to their
OS.
 
Todd Vargo said:
I don't see this very often at all. I am annoyed when I see the ECHO Y
OUCH!

version used where a command has it's own /y switch.

Whew! that let's me off the hook! Of course, I would only use echo/y when
that was the only practical way...
ISTM when I see this
syntax these days, I assume these are by people who are learning/clipping
batch code from a DOS website instead of more appropriately related to
their
OS.

Not me, honest.

/Al
 
Back
Top