Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35526

Re: Batch pipe JScript question

Newsgroups comp.lang.javascript
Subject Re: Batch pipe JScript question
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <f15ab55b-562a-4005-a351-230861244b24@googlegroups.com> <XnsA942EB3CBFE8Eeejj99@194.109.6.166> <1effe412-1e7a-4140-a805-e24e05281ca2@googlegroups.com>
Date 2018-08-19 11:40 +0200
Message-ID <XnsA94376AFE4063eejj99@194.109.6.166> (permalink)

Show all headers | View raw


Dr J R Stockton <J.R.Stockton@physics.org> wrote on 19 Aug 2018 in 
comp.lang.javascript:

> Your way might be better for piping the output into,
> for example, FIND or MiniTrue.

Yes, stdin and stdout are marvelous to bag piping.

A pity jscript is not keeping up with javascript,
else, for instance:

================
'use strict';
const stdin = WScript.StdIn;
const stdout = WScript.StdOut;
const rep = (s) => s.replace(/xxx/,'aaa');

while (!stdin.AtEndOfStream)
  stdout.WriteLine(rep(stdin.ReadLine()));
================

[sorry, can't test that]

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Batch pipe JScript question Dr J R Stockton <J.R.Stockton@physics.org> - 2018-08-18 12:46 -0700
  Re: Batch pipe JScript question "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-08-18 13:44 -0700
    Re: Batch pipe JScript question Dr J R Stockton <J.R.Stockton@physics.org> - 2018-08-18 14:43 -0700
  Re: Batch pipe JScript question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-08-18 23:07 +0200
    Re: Batch pipe JScript question Dr J R Stockton <J.R.Stockton@physics.org> - 2018-08-18 15:09 -0700
      Re: Batch pipe JScript question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-08-19 11:40 +0200
        Re: Batch pipe JScript question Dr J R Stockton <J.R.Stockton@physics.org> - 2018-08-19 09:12 -0700
          Re: Batch pipe JScript question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-08-19 22:49 +0200
            Re: Batch pipe JScript question Dr J R Stockton <J.R.Stockton@physics.org> - 2018-08-20 03:22 -0700

csiph-web