RE: [LDAPsh-devel] Enhanced redirection
Status: Beta
Brought to you by:
rcorvalan
|
From: Rafael C. <Raf...@li...> - 2003-09-23 15:10:16
|
Hello,
You're right. The line:
if (s/;\s*([|>][\s\w\d_\/.-]+)//) {
is historical. Prior to have the ";|" syntax, we got some problems with
someting like:
if ( $a | $b ) {.....
to avoid that, the regexp was very restrictive (you can only have
[\s\w\d_\/.-]+ after the "greater that" or the "pipe"), so the parsing
would be better. But this regexp is broken too.
Since the problem has been partially solved by the "|;" and ";>" syntax,
we can use :
if (s/;\s*([|>].+)//) {
I will replace this regexp and make a new release and publish it.
Bye
Rafael=20
-----Original Message-----
From: James Devenish [mailto:j-d...@us...]=20
Sent: dimanche, 21. septembre 2003 04:11
To: lda...@li...
Subject: Re: [LDAPsh-devel] Enhanced redirection
<...>
> cat 'cn=3Dtest' | grep -i last
>=20
> will give an error.
If you use ;| instead of | then it will work. I.e.:
cat 'cn=3Dtest' ;| grep -i last
This is not ideal (as you have said) but it is what we have included in
our documented example.
PS. Actually, it will not work: grep will be invoked without the "-i
last" options. This is because of the following line:
if (s/;\s*([|>][\s\w\d_\/.-]+)//) {
I am not sure of the purpose of that line, so you might like to make a
decision about whether it should look more like this:
if (s/;\s*([|>].+)//) {
(The above line is what I, personally, use).
|