Synax: /checkdoubles
What this does: It will check every line of a text file and if two lines match, it will remove one.
alias checkdoubles {
set %lcv.chkdbl 1
while (%lcv.chkdbl <= $lines($1-)) {
hadd -m chkdbl $read($1-,%lcv.chkdbl) 1
inc %lcv.chkdbl
}
set %lcv.chkdbl 1
write -c " $+ $1- $+ "
while (%lcv.chkdbl <= $hget(chkdbl,0).data) {
write " $+ $1- $+ " $hget(chkdbl,%lcv.chkdbl).item
inc %lcv.chkdbl
}
unset %lcv.chkdbl
hfree chkdbl
}