Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-16-2004, 02:39 PM   #1
Registered: May 2003
Posts: 256

Rep: Reputation: 30
Question uniq in tcl/tk

Does Tcl have a 'uniq' equivalent?

If you what is it?

Please advise.
Old 05-20-2004, 10:34 PM   #2
Registered: May 2003
Posts: 256

Original Poster
Rep: Reputation: 30
Question Tcl's luniq

I found it:

List with duplicates removed, and keeping the original order:

proc luniq {L} {
# removes duplicates without sorting the input list
set t {}
foreach i $L {if {[lsearch -exact $t $i]==-1} {lappend t $i}}
return $t
} ;# RS


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tcl/tk wasabi Fedora 0 06-03-2004 09:42 AM
TCL/TK vs. Qt liguorir Linux - Software 1 02-12-2004 04:54 AM
Tcl help anyone? CanadianPenguin Programming 4 12-30-2003 05:42 PM
Catch-22 with 'uniq' - sed, awk, another way out? slakmagik Linux - General 5 07-31-2003 09:18 AM
uniq Cyth Linux - General 2 02-19-2003 09:29 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration