LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-16-2004, 02:39 PM   #1
liguorir
Member
 
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
liguorir
Member
 
Registered: May 2003
Posts: 256

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

I found it:

http://wiki.tcl.tk/526

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
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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