anchor.diff:  set CMDLINE=%ARGS%
   if defined CMDLINE (
     call :Entities.decode ARGS CMDLINE
  -  set CMDLINE=%CMDLINE% ^^^| findstr /R "^."
  +  set CMDLINE=%CMDLINE%^^^| findstr /R "^."
  +  set "SENDKEYS="
   ) else ( :# No command. Get the input from standard input.
     set CMDLINE=findstr /R "^."
  -  set SET=CScript //nologo //E:JScript "%SFULL%"
  +  if "%CAPTURE%"==":CaptureLast" set SET=CScript //nologo //E:JScript "%SFULL%"
  +  set "SENDKEYS=%EXEC% CScript //nologo //E:JScript "%SFULL%" -s %VAR% RESULT"
   )
   :# %IF_NOEXEC% set CMDLINE
   :# In no-exec mode, correct the # of ^ so that the ^| displays right
   %IF_NOEXEC% set CMDLINE=%CMDLINE: ^| = ^^^^^^^| %
  +
  +goto %CAPTURE%
  +
  +:# Capture all output lines, quoting those with spaces or special characters
  +:CaptureAll
  +setlocal EnableDelayedExpansion
  +set "RESULT="
  +%EXEC% for /f "delims=" %%s in ('%CMDLINE%') do call :lappend RESULT "%%~s"
   
   :# NOTE: The findstr CMDLINE, used by default above, works for capturing stdin.
   :# What does not work is the export of the variable to the parent cmd.exe using pure batch.
  
positive.code: :#   2021-01-11 JFL Created this script.				      *
  :#   2021-01-22 JFL Added a dirty work around the pipe issue by generating    *
  :#                  key strokes using JScript WScript.Shell.SendKeys().       *
  :#                                                                            *
  :#         Copyright 2021 Hewlett Packard Enterprise Development LP          *
  :# Licensed under the Apache 2.0 license: www.apache.org/licenses/LICENSE-2.0 *
  :#*****************************************************************************
  
  setlocal EnableExtensions DisableDelayedExpansion
  set "VERSION=2021-01-22"
  set "SCRIPT=%~nx0"		&:# Script name
  set "SNAME=%~n0"		&:# Script name without the extension
  set "SPATH=%~dp0"
  
negative.code: 
  :#############################################################################:
  End of the JScript comment around the Batch section; Beginning of the JScript section */
  
  /* Get the value of an environment variable */
  var shell;
  function getenv(varname, envname) {  // envname = "Process" | "System" | "User" | "Volatile"
    if (!envname) envname = "Process"; // By default, use the current environment
    if (!shell) shell = new ActiveXObject("WScript.Shell"); // Reuse the shell object
    var env = shell.Environment(envname);
    return env(varname);
  }
  
  /* Escape the reserved characters used by shell.SendKeys */
  function EscapeKeys(string) {
    keys = "";
    for (var j = 0; j < string.length; j++) {
      var c = string.charAt(j);
      switch (c) {
      case '+':
      case '~':
      case '(':
      case ')':
      case '{':
      case '}':
        c = "{" + c + "}";
        break;
      case '^':
      case '%':
        c = "{" + c + "}";
        c = c + c;
        break;
      }
      keys += c;
    }
    return keys;
  }
  
  /* Process JScript command-line arguments */
  function main(argc, argv) {
    var keys = "";
    for (var i = 1; i < argc; i++) {
      var arg = argv[i];
      switch (arg) {
      case "-s":
        var cmdline = "set " + argv[++i] + "=" + getenv(argv[++i]);
        cmdline = EscapeKeys(cmdline); // Escape the reserved characters used by SendKeys
        if (!shell) shell = WScript.CreateObject("WScript.Shell");
        shell.SendKeys("{ESC}" + cmdline + "{ENTER}"); // The ESC character empties cmd's input buffer
        return 0;
      default:
        WScript.Echo("Unexpected argument:" + arg);
        return 1;
      }
    }
  }
  
  /* Top level code, building a C-like environment */
  