INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Need some urgent help with tcl comands

Need some urgent help with tcl comands

(OP)
Hi,

I would appreciate any help from you guys, I am a newbie to tcl

I am to print out few list which I am retrieving from different loops,

abc 1 3 4 xyz...
abc 2 4 5 sadas...
abc
abc.bcd
abc.bcd
abc
abc
abc
abc.xyz
....


How can I sort these lines such that I get
abc 1 3 4 xyz...
abc 2 4 5 sadas...
abc
abc
abc
abc
abc.bcd
abc.bcd
abc.xyz

Have tried doing lsort and other things, but I am not sure if that is the way.
I am fine with saving them in file and doing file operation, but would be preferable if I do that on tcl interface.

RE: Need some urgent help with tcl comands

If lsort supplies the end result you need and you are not constrained by time issues of lists that are 100's of thousands long, then go with it. If you have huge lists and sorting speed is paramount, there are sites where you can find/review the various theories/algorithms on sorting. Bubble sort, loop sort, hash sort come to mind.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close