Tweak3D.Net
Save?
Not Registered Yet? Go here.
Xoxide Computer Mods
Join The Cult Tweakers Image Gallery Donate Search Today's Posts Mark Forums Read

Welcome to Tweak3D

This is an open forum about tech stuff, games, and cars. Sign-up here to join the discussion.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2006, 10:50 PM Question About Sort command   permalink #1
Axl_Rose's Avatar
Axl_Rose
Tweak Minion
 
Jan 2005
Last Seen: 07-21-2008
Posts: 2,429 (#36)
Thanked 0x in 0 posts

This is more for a guru(read: Wedge or anyone else that know haha). I'm going over a test for a linux course, and one of the commands I need to use is the Sort command. I have never used it, and the man page wasn't too userfriendly. So I guess if someone could give me an example how it is used that would be great.

Axl_Rose is offline   Reply With Quote
Yesterday, 05:30 PM   #2
 
 


Google is online (hide)  
Old 08-16-2006, 03:02 AM   permalink #2
Wedge_'s Avatar
Wedge_
Rogue One
 
Jan 2005
Last Seen: Today
Location: Scotland
Posts: 997 (#89)
Thanked 0x in 0 posts

The manpage doesn't seem too bad, but here are some simple examples:

If you just want to sort the lines in a file:
sort <filename>

If you want to sort in reverse order:
sort -r <filename>

If you want to remove duplicates from the results:
sort -u <filename>

Per Ardua Ad Astra
Wedge_ is offline   Reply With Quote
Old 08-16-2006, 09:12 AM   permalink #3
Axl_Rose's Avatar
Axl_Rose
Tweak Minion
 
Jan 2005
Last Seen: 07-21-2008
Posts: 2,429 (#36)
Thanked 0x in 0 posts

Ohh ok I get it now. I messed around with it and it actually sorted the stuff alphabetically. The reason I never realised it before is because is just did and ls > file.txt and then i did a sort of file.txt but it was already in alphabetacle order haha.
Axl_Rose is offline   Reply With Quote
Reply

Login to reply. Sign-up here.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 03:49 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0
©Tweak3D.Net 1998-2008Ad Management by RedTyger