[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Noob needs current tutorial please
From: |
Stefan Schmiedl |
Subject: |
Re: Noob needs current tutorial please |
Date: |
Sun, 10 Jan 2021 09:56:00 +0100 |
"Duke Normandin" <dukeofpurl@gmx.com>, 10.01.2021, 05:05:
> Follow-up ...
> The code executed without a burp! :-) However ...
c:\>> csi -ss quickrep.scm <quickrep.dat 'a.*c' A
> xyzabcghi
> abxawxcgh
> foonly
> Something went off the rails! The regex did NOT work. The script
> simply spit the input back out. ad it worked, the output would have
> been:
> xyzAghi
> Agh
> foonly
> I'm on a Windoze10 box. Could that somehow be the problem?
Hi Duke,
strictly speaking, it's probably cmd.exe's fault, as it is similar
but not identical to shell behaviour. While I/O redirection works
the same way with <, >, 2>, cmd.exe does not do globbing, i.e.
expansion of wildcard patterns. Instead it passes the arguments
straight to the program handling them. Also, AFAIR it only uses
" for quoting, not '. powershell might show different behaviour.
So I'd expect that csi did not receive
a.*c
A
as commandline arguments but
'a.*c'
A
which would not match the input you've provided.
Write a program echoing its commandline arguments to stdout
and then feed it with different types of arguments:
csi -ss echo.scm a b A 123 a.*c 'a.*c' "d e f" 'g h i' j\ k
to test which of your assumptions with respect to arguments hold.
HTH,
s.