DEFLNG a-z 'removes doubled lines from a file FUNCTION PBMAIN() filein$ = PARSE$(COMMAND$," ",1) IF filein$ = "" THEN PRINT "Error: nodouble filein" PRINT EXIT FUNCTION END IF IF DIR$(filein$) = "" THEN PRINT "Error: filenotfound" PRINT EXIT FUNCTION END IF OPEN filein$ FOR INPUT AS #1 prevline$ = "" totallines = 0: totalremoved = 0 DO UNTIL EOF(1) LINE INPUT #1, x$ INCR totallines IF TRIM$(LCASE$(x$)) = prevline$ THEN INCR totalremoved ELSE STDOUT x$ prevline$ = TRIM$(LCASE$(x$)) END IF LOOP PRINT "Processed " & FORMAT$(totallines) & " lines and removed " & FORMAT$(totalremoved) & "." CLOSE #1 END FUNCTION