in reply to Read from a pipe with WinXP/AS 5.8.2?

You'll need to consult the docs/forums for the bash shell you are using

P:\test>ls | perl -nle"s/\./-.-/; print" 237671-.-pl8 242776-.-pl8 243366-.-pl8 250383-.-pl8 250495-.-pl8 251580-.-pl8 251933-.-pl8 252633-.-pl8 253059-.-pl8 [snip]

That's the GNU ls running under cmd.exe piping to AS perl5.8.1 under NT4.

Update: It also works fine under the sh.exe that comes from GNU utilities for Win32.

D:\WINNT\unxtools>sh HIAWATHA# ls | perl -ple" s/\./-.-/" FlexLexer-.-h StdDisclaimer-.-html UnxUtilsDist-.-html agrep-.-exe ansi2knr-.-exe basename-.-exe bc-.-exe bison-.-exe bison-.-hairy [snip]

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!

Replies are listed 'Best First'.
Re: Re: Read from a pipe with WinXP/AS 5.8.2?
by graff (Chancellor) on Jan 07, 2004 at 05:16 UTC
    I see that cmd.exe is included with XP -- slight relief (command.com was all I knew, and it's such a pain), but this is still no substitute for bash. Oh well, at least I have a couple places to start looking (including Cygwin).

    Thanks to both of you!

    Update: following the Gnu link provided by BrowserUK above, I also happened to find yet another source of unix-environment tools for windows: http://www.research.att.com/sw/tools/uwin/ -- where the offerings include ksh (like bash, sort of, but a little different), which does what I want: pipes work as expected. It can also do real unix-style handling of the shebang line in perl scripts, and there appears to be an X-Windows component to the overall package -- gotta check that out... Altogether a very slick looking setup, though apparently not open-source.