On Thu, 28 Sep 2000, Cristi Banciu wrote:

> Se da un fisier text.Cum fac sa elimin toate liniile identice, astfel incat sa
> ramana doar una ? 
Uite un script in TCL care face asta. Ce ii vine la stdin scoate nedublat
la stdout. Il rulezi cu 'tclsh <nume fisier script>'

# Begin script
set lines ""
while {![eof stdin]} {
        set line [gets stdin]
        if {[lsearch -exact $lines $line] == -1} {
          puts $line
          lappend lines $line
        }
}
# End script

____________________________________
Catalin Braica
[EMAIL PROTECTED]        
Tel: 409-452-4161  Work: 405-141-3496
http://www.edulib.ro/~catalin/


---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui