Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Core and stdin

From: brian:hawley at: 12-Apr-2001 15:15

2ker wrote:
>Is this possible to catch data from stdin with REBOL/Core? >(something like: cat file.txt |rebol -w script.r ) >Does it require /Command or /View/Pro (shell extension)?
It depends on whether you're running Windows or something more Unix-like. On Unix-like systems, I/O redirection is done without difficulties. On Windows the | operator does not work with REBOL, just > and <. You can do full I/O redirection from within REBOL with the shell functions of /Command and /Pro, but in REBOL syntax. See the docs on the shell functions on the REBOL site, but before you ask: No, you can't use the | operator with /Pro or /Command on Windows either. My advise: Get /Pro and use REBOL scripts as the main glue to call all of the external programs, instead of DOS batch language (useless) or Perl (ugly) :) Brian Hawley