Hello Horstl,
Great Work!
I love it, except now im getting 2 datasets, one with it all bunched up and the other, which was sortted nicely with the spaces and all nice a neat.
I think I prefer your way of dumping it into this "hidden window" and then writting it back into a text file.
How would you go about achieving this, I have to admit that I am not the best when it comes to data manipulation.
Great suggestions and comments so far im getting there,
Heres what I have so far relating to your previous comments in other posts:
Dataset:
3ngsxp=3ngsxp,04f9cbc0610c273baeee6757d9631b05,41.208.65.133,awb_123@yahoo.com
alias 1234 {
var %file = $+($scriptdir,Report_IPInfo.txt)
if ($isfile(%file)) { .remove %file }
hsave -i ipinfo %file
write -dl1 %file
filter -ffct $1 61 %file %file
;write -il1 %file Data Sorted by collumn $1 : $crlf $crlf
; write heading lines
write %file Total matches: $lines(%file)
write %file $crlf
write %file $crlf
; do something with the lines of file.txt and insert blank lines
var %n = 1
while ($read(%file,%n)) {
tokenize 44 $v1
write %file Nick: $GETTOK($1,1,61) Address: $2 IP: $3 eMail: $4
write %file $crlf
inc %n
}
run %file
}
;Edit Corrected Alias based on Horstl's advice:
;1 = Compile by Nickname
;2 = Compile by Address
;3 = Compile by IP Address
;4 = Compile by Email
;usage ipinfo_compile 1
alias ipinfo_compile {
var %x = $1 | %x = $replace(%x,1,Nickname,2,Address,3,IP Address,4,E-mail)
if (!$window(@test)) { window -hw0 @test }
else { clear @test }
var %i = 1, %t = ipinfo, %file = $+($scriptdir,Report_IPInfo.txt)
if ($isfile(%file)) { .remove %file }
while $hget(%t, %i).item != $null {
aline @test $hget(%t, $v1) $crlf $crlf
inc %i
}
filter -wfct $1 44 @test %file
write %file ----------------------------------------------------------------------------------
write %file Report runtime: $+($asctime(ddd mmm dd @ HH:nn:ss),.) There are $hget(%t,0).item item(s) listed
write %file Report compiled by: %x
run %file
}