Re: TeraScript-Talk: Distinct IPs

2018-02-25 Thread Wayne Irvine
Cheers Robert,

I found the culprit. My rsuffix paramter was adding some whitespaces which was 
making the array values unique.

Wayne

> On 23 Feb 2018, at 11:19 am, Robert Shubert  wrote:
>
> Wayne,
>
> Look for something simple because that should work.
>
> If you’re stuck forward the TAF or a reproduction of the problem to me at 
> support.
>
> Robert
>
> From: Wayne Irvine [mailto:wa...@byteserve.com.au 
> <mailto:wa...@byteserve.com.au>]
> Sent: Wednesday, February 21, 2018 3:42 PM
> To: TeraScript-Talk@terascript.com <mailto:TeraScript-Talk@terascript.com>
> Subject: TeraScript-Talk: Distinct IPs
>
> I am building a tool to allow me to add addresses to Postfix list of banned 
> IPs.
>
> I’ve got it parsing the files and extracting the IPs and sorting them in 
> order, but I can’t get @DISTINCT to work.
>
> <@ASSIGN NAME=DistinctBadIPs VALUE=<@DISTINCT ARRAY=BadIPs COLS="1 DICT" 
> SCOPE=local>>
>
> 
> 173.240.14.31 Your IP is SPAM!
> 173.240.14.61 Your IP is SPAM!
> 185.153.229.0/24 Your IP is SPAM!
> 185.162.146.0/24 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.244.77 Your IP is SPAM!
> 185.179.246.28 Your IP is SPAM!
> 185.65.246.142 Your IP is SPAM!
> 185.70.187.118 Your IP is SPAM!
> 
>
> I’ve tried default (SMART), NUM, and DICT comparison types. Is it due to the 
> ‘.’s or something dumb I’m doing?
>
> Wayne
>
> Byteserve Pty Ltd
> w: http://www.byteserve.com.au/ <http://www.byteserve.com.au/>
> e: i...@byteserve.com.au <mailto:i...@byteserve.com.au>
> p: +61 02 9960 6099
> m: 0409 960 609
> f: +61 02 9960 6088
>
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com <mailto:lists...@terascript.com> with "unsubscribe 
> terascript-talk" in the body.
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com <mailto:lists...@terascript.com> with "unsubscribe 
> terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


RE: TeraScript-Talk: Distinct IPs

2018-02-22 Thread Robert Shubert
Wayne,



Look for something simple because that should work.



If you’re stuck forward the TAF or a reproduction of the problem to me at 
support.



Robert



From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Wednesday, February 21, 2018 3:42 PM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Distinct IPs



I am building a tool to allow me to add addresses to Postfix list of banned IPs.



I’ve got it parsing the files and extracting the IPs and sorting them in order, 
but I can’t get @DISTINCT to work.



<@ASSIGN NAME=DistinctBadIPs VALUE=<@DISTINCT ARRAY=BadIPs COLS="1 DICT" 
SCOPE=local>>





173.240.14.31 Your IP is SPAM!
173.240.14.61 Your IP is SPAM!
185.153.229.0/24 Your IP is SPAM!
185.162.146.0/24 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.244.77 Your IP is SPAM!
185.179.246.28 Your IP is SPAM!
185.65.246.142 Your IP is SPAM!
185.70.187.118 Your IP is SPAM!





I’ve tried default (SMART), NUM, and DICT comparison types. Is it due to the 
‘.’s or something dumb I’m doing?



Wayne



Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au <mailto:i...@byteserve.com.au>
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088





  _

To unsubscribe from this list, please send an email to lists...@terascript.com 
<mailto:lists...@terascript.com>  with "unsubscribe terascript-talk" in the 
body.






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


TeraScript-Talk: Distinct IPs

2018-02-21 Thread Wayne Irvine
I am building a tool to allow me to add addresses to Postfix list of banned IPs.

I’ve got it parsing the files and extracting the IPs and sorting them in order, 
but I can’t get @DISTINCT to work.

<@ASSIGN NAME=DistinctBadIPs VALUE=<@DISTINCT ARRAY=BadIPs COLS="1 DICT" 
SCOPE=local>>


173.240.14.31   Your IP is SPAM!
173.240.14.61   Your IP is SPAM!
185.153.229.0/24Your IP is SPAM!
185.162.146.0/24Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.244.77  Your IP is SPAM!
185.179.246.28  Your IP is SPAM!
185.65.246.142  Your IP is SPAM!
185.70.187.118  Your IP is SPAM!


I’ve tried default (SMART), NUM, and DICT comparison types. Is it due to the 
‘.’s or something dumb I’m doing?

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: DISTINCT

2014-12-27 Thread Michael Heth

> On Dec 26, 2014, at 11:32 PM, Wayne Irvine  wrote:
>
> Thanks for your work!
>
> Breaking it up into distinct (funny that) lines fixed the issue. Still not 
> sure why though.

Maybe because you were asking for the distinct values in (what was) a column 
but there was only one column?

After the transpose there were many rows.

HTH.

Thanks,

M./

Michael Heth
tangopo...@serversmiths.com











To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



Re: TeraScript-Talk: DISTINCT

2014-12-27 Thread ubslab
Glad to be of help


On 12/26/14 11:32 PM, Wayne Irvine wrote:
> Thanks for your work!
>
> Breaking it up into distinct (funny that) lines fixed the issue. Still
> not sure why though.
>
> <@ASSIGN NAME="blocktext" VALUE="<@LOWER STR='<@arg blocktext>'>"
> SCOPE="REQUEST">
>
> <@ASSIGN NAME="blocktext" VALUE='<@KEEP STR="@@blocktext" CHARS="
> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
> SCOPE=request>
>
> <@ASSIGN NAME="rawtagarray" VALUE="<@TOKENIZE STR='@@blocktext'
> CHARS=' '>" SCOPE="REQUEST">
> <@VAR rawtagarray>
>
> <@ASSIGN NAME="rawtagarray" VALUE="<@TRANSPOSE ARRAY='rawtagarray'>"
> SCOPE="REQUEST">
>
> <@ASSIGN NAME="tagarray" VALUE="<@DISTINCT ARRAY='rawtagarray'>"
> SCOPE="REQUEST">
>
> @@tagarray
>
> brown
> dog
> fox
> jumps
> lazy
> over
> quick
> the
>
>
> Nice!
>
> Wayne Irvine
>
>> On 27 Dec 2014, at 5:01 pm, ubslab > > wrote:
>>
>> Wayne,
>>
>> I tried to replicate the error using:
>>
>> <@ASSIGN NAME="rawtagarray" VALUE="<@TOKENIZE STR=' the quick brown fox
>> jumps over the lazy dog ' CHARS=' '>" SCOPE="REQUEST">
>> <@VAR rawtagarray>
>> <@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='rawtagarray'>"
>> SCOPE="REQUEST">
>> <@ASSIGN NAME="tagarray" VALUE="<@DISTINCT ARRAY='tagarray'>"
>> SCOPE="REQUEST">
>> <@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='tagarray'>"
>> SCOPE="REQUEST">
>> <@VAR tagarray>
>>
>> The error shows when the first transpose is is commented out.
>> So possibly rows vs columns for the @distinct?
>>
>>
>>
>> On 12/26/14 3:36 AM, Wayne Irvine wrote:
>>> Local and request are the same. Local is deprecated and I really
>>> should get in the habit of writing request.
>>>
>>>
>>>
>>>
 On 26 Dec 2014, at 8:29 pm, ubslab >>> > wrote:

 Wayne,

 In <@DISTINCT ARRAY='rawtagarray' SCOPE=local>  you are looking for
 rawtagarray  in local scope.

 In <@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE
 ARRAY="<@TOKENIZE STR='<@KEEP STR="<@arg blocktext>" CHARS="
 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
 CHARS=' '>">'>">  unless you have changed server preferences the
 default
 scope assignment is likely to be request.


> On 12/25/14 9:17 PM, Wayne Irvine wrote:
> <@DISTINCT ARRAY='rawtagarray' SCOPE=local>



 

 To unsubscribe from this list, please send an email to
 lists...@terascript.com  with
 "unsubscribe terascript-talk" in the body.

>>>
>>>
>>> 
>>>
>>> To unsubscribe from this list, please send an email to
>>> lists...@terascript.com  with
>>> "unsubscribe terascript-talk" in the body.
>>>
>>
>>
>>
>>
>> 
>>
>> To unsubscribe from this list, please send an email to
>> lists...@terascript.com  with
>> "unsubscribe terascript-talk" in the body.
>>
>
> Wayne Irvine
> w: http://www.byteserve.com.au/
> p: +61 2 9960 6099
> m: 0409 960 609
>
>
> 
> To unsubscribe from this list, please send an email to
> lists...@terascript.com  with
> "unsubscribe terascript-talk" in the body.






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: DISTINCT

2014-12-26 Thread Wayne Irvine
Thanks for your work!

Breaking it up into distinct (funny that) lines fixed the issue. Still not sure 
why though.

<@ASSIGN NAME="blocktext" VALUE="<@LOWER STR='<@arg blocktext>'>" 
SCOPE="REQUEST">

<@ASSIGN NAME="blocktext" VALUE='<@KEEP STR="@@blocktext" CHARS=" 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">' 
SCOPE=request>

<@ASSIGN NAME="rawtagarray" VALUE="<@TOKENIZE STR='@@blocktext' CHARS=' '>" 
SCOPE="REQUEST">
<@VAR rawtagarray>

<@ASSIGN NAME="rawtagarray" VALUE="<@TRANSPOSE ARRAY='rawtagarray'>"
SCOPE="REQUEST">

<@ASSIGN NAME="tagarray" VALUE="<@DISTINCT ARRAY='rawtagarray'>"
SCOPE="REQUEST">

@@tagarray

brown
dog
fox
jumps
lazy
over
quick
the

Nice!

Wayne Irvine

> On 27 Dec 2014, at 5:01 pm, ubslab  wrote:
>
> Wayne,
>
> I tried to replicate the error using:
>
> <@ASSIGN NAME="rawtagarray" VALUE="<@TOKENIZE STR=' the quick brown fox
> jumps over the lazy dog ' CHARS=' '>" SCOPE="REQUEST">
> <@VAR rawtagarray>
> <@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='rawtagarray'>"
> SCOPE="REQUEST">
> <@ASSIGN NAME="tagarray" VALUE="<@DISTINCT ARRAY='tagarray'>"
> SCOPE="REQUEST">
> <@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='tagarray'>"
> SCOPE="REQUEST">
> <@VAR tagarray>
>
> The error shows when the first transpose is is commented out.
> So possibly rows vs columns for the @distinct?
>
>
>
> On 12/26/14 3:36 AM, Wayne Irvine wrote:
>> Local and request are the same. Local is deprecated and I really should get 
>> in the habit of writing request.
>>
>>
>>
>>
>>> On 26 Dec 2014, at 8:29 pm, ubslab  wrote:
>>>
>>> Wayne,
>>>
>>> In <@DISTINCT ARRAY='rawtagarray' SCOPE=local>  you are looking for
>>> rawtagarray  in local scope.
>>>
>>> In <@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE
>>> ARRAY="<@TOKENIZE STR='<@KEEP STR="<@arg blocktext>" CHARS="
>>> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
>>> CHARS=' '>">'>">  unless you have changed server preferences the default
>>> scope assignment is likely to be request.
>>>
>>>
 On 12/25/14 9:17 PM, Wayne Irvine wrote:
 <@DISTINCT ARRAY='rawtagarray' SCOPE=local>
>>>
>>>
>>>
>>> 
>>>
>>> To unsubscribe from this list, please send an email to 
>>> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>>>
>>
>>
>> 
>>
>> To unsubscribe from this list, please send an email to 
>> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>>
>
>
>
>
> 
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>

Wayne Irvine
w: http://www.byteserve.com.au/
p: +61 2 9960 6099
m: 0409 960 609






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: DISTINCT

2014-12-26 Thread ubslab
Wayne,

I tried to replicate the error using:

<@ASSIGN NAME="rawtagarray" VALUE="<@TOKENIZE STR=' the quick brown fox
jumps over the lazy dog ' CHARS=' '>" SCOPE="REQUEST">
<@VAR rawtagarray>
<@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='rawtagarray'>"
SCOPE="REQUEST">
<@ASSIGN NAME="tagarray" VALUE="<@DISTINCT ARRAY='tagarray'>"
SCOPE="REQUEST">
<@ASSIGN NAME="tagarray" VALUE="<@TRANSPOSE ARRAY='tagarray'>"
SCOPE="REQUEST">
<@VAR tagarray>

The error shows when the first transpose is is commented out.
So possibly rows vs columns for the @distinct?



On 12/26/14 3:36 AM, Wayne Irvine wrote:
> Local and request are the same. Local is deprecated and I really should get 
> in the habit of writing request.
>
>
>
>
>> On 26 Dec 2014, at 8:29 pm, ubslab  wrote:
>>
>> Wayne,
>>
>> In <@DISTINCT ARRAY='rawtagarray' SCOPE=local>  you are looking for
>> rawtagarray  in local scope.
>>
>> In <@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE
>> ARRAY="<@TOKENIZE STR='<@KEEP STR="<@arg blocktext>" CHARS="
>> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
>> CHARS=' '>">'>">  unless you have changed server preferences the default
>> scope assignment is likely to be request.
>>
>>
>>> On 12/25/14 9:17 PM, Wayne Irvine wrote:
>>> <@DISTINCT ARRAY='rawtagarray' SCOPE=local>
>>
>>
>>
>> 
>>
>> To unsubscribe from this list, please send an email to 
>> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>>
>
>
> 
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



Re: TeraScript-Talk: DISTINCT

2014-12-26 Thread Wayne Irvine
Local and request are the same. Local is deprecated and I really should get in 
the habit of writing request.




> On 26 Dec 2014, at 8:29 pm, ubslab  wrote:
>
> Wayne,
>
> In <@DISTINCT ARRAY='rawtagarray' SCOPE=local>  you are looking for
> rawtagarray  in local scope.
>
> In <@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE
> ARRAY="<@TOKENIZE STR='<@KEEP STR="<@arg blocktext>" CHARS="
> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
> CHARS=' '>">'>">  unless you have changed server preferences the default
> scope assignment is likely to be request.
>
>
>> On 12/25/14 9:17 PM, Wayne Irvine wrote:
>> <@DISTINCT ARRAY='rawtagarray' SCOPE=local>
>
>
>
>
> 
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>





To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



Re: TeraScript-Talk: DISTINCT

2014-12-26 Thread ubslab
Wayne,

In <@DISTINCT ARRAY='rawtagarray' SCOPE=local>  you are looking for
rawtagarray  in local scope.

In <@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE
ARRAY="<@TOKENIZE STR='<@KEEP STR="<@arg blocktext>" CHARS="
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">'
CHARS=' '>">'>">  unless you have changed server preferences the default
scope assignment is likely to be request.


On 12/25/14 9:17 PM, Wayne Irvine wrote:
> <@DISTINCT ARRAY='rawtagarray' SCOPE=local>






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



TeraScript-Talk: DISTINCT

2014-12-25 Thread Wayne Irvine
Having an issue with the @DISTINCT tag. I’ve used it before and I also remember 
having issues with it previously. Not sure if the bug was with me or it however.

I make an array:

<@ASSIGN NAME=rawtagarray VALUE="<@LOWER str='<@TRANSPOSE ARRAY="<@TOKENIZE 
STR='<@KEEP STR="<@arg blocktext>" CHARS=" 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_">' CHARS=' 
'>">'>">

Which for the arg “The quick brown fox jumps over the lazy dog.” returns an 
array of 9 rows and 1 columns.

the
quick
brown
fox
jumps
over
the
lazy
dog

Two of the rows contains ‘the’.

The problem occurs when I submit the array to the @DISTINCT function.

<@ASSIGN name=tagarray VALUE="<@DISTINCT ARRAY='rawtagarray' SCOPE=local>”>

Error

An error occurred while processing your request:

File: maketags.taf
Position: BuildTagArray
Class: Internal
Main Error Number: -614

An array was expected as a parameter.
In @DISTINCT, ARRAY attribute.


Meta Stack Trace:

LineMeta Tag
0001<@DISTINCT ARRAY='rawtagarray' SCOPE=local>
0008
*The meta stack is interpreted top-to-bottom: the top line shows the inner 
metatag that caused the error.

I have tried every option I can think of the the parameters.

rawtagarray
@@rawtagarray
@@local$rawtagarrary

with and without the optional SCOPE parameter.

Bit stumped.

Wayne Irvine
w: http://www.byteserve.com.au/
p: +61 2 9960 6099
m: 0409 960 609






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.