- - PR -
stdin ?
1
| 投稿者 | 投稿内容 | ||||
|---|---|---|---|---|---|
|
投稿日時: 2001-08-16 16:26
can be used just one line stdin. how about multiple line input? does W2k have a full fledged stdin? | ||||
|
投稿日時: 2001-08-17 16:15
Hi Oregon,
Basically, I use a temporary file to input multi-line. Like; copy con temp.file It's not beautiful, and expect users to input "^Z". :-P So, how about the following code? It's too simple - can't handle a space & a empty line. :-) --------------------------------- @echo off set boo= :LOOP set foo= set/p foo= set boo=%boo% %foo% if defined foo goto LOOP for %%v in (%boo%) do echo %%v | ||||
|
投稿日時: 2001-08-19 04:28
hmmmm...
ctrl-Z for end of file is norm and fine. but there are problematic behaviors: 1. no pipe - I need "something | this.bat" 2. a blank line causes end of input (before ctrl-Z gets caught) 3. glitches special characters (fun to watch ! & * ^ ...) 4. space separated input makes multiple lines a word they are are important to me in that order. yr idea of "copy con..." lead me to think; using other fileters - 'more' !
it satisfies all 4 items above. now let's try an easy one-liner - 'tee'
how about other filters like 'sed'? | ||||
|
投稿日時: 2001-08-26 07:35
"tee" one-liner should rather read:
and "sed" stuff will appear in a new thread. | ||||
1
