Explanation for sort utility and its detail

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Explanation for sort utility and its detail
# 1  
Old 02-16-2018
Explanation for sort utility and its detail

I tried to use sort utility and typed sort --help, read one of lines; its -k option, and part of it:

Quote:
OPTS is one or more single-letter ordering options [bdfgiMhnRrV], which override global ordering options for that key
I am really not getting it
Anyone do me a useful favor to save me out of my ignorance ?

Moderator's Comments:
Mod Comment Please use correct tags as required by forum rules!

Last edited by RudiC; 02-16-2018 at 09:01 AM.. Reason: Added ICODE/QUOTE tags.
This User Gave Thanks to abdulbadii For This Post:
# 2  
Old 02-16-2018
All those options refine the behaviour of sort; e.g. -n if set globally would try to interpret any field numerically, so 10 would sort after 9. If specified for a single key field only, that field would be treated as a number, all others according to what was set globally (or the default).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Disk Usage in Detail !!

Hi ALL, I always use du command for analyzing diskusage to housekeep a filesystem. Can somebody tell the where first row filesize resides? bash-3.2# df -gt /tmp Filesystem GB blocks Used Free %Used Mounted on /dev/hd3 16.50 10.01 6.49 61% /tmp bash-3.2# bash-3.2# pwd... (6 Replies)
Discussion started by: Thala
6 Replies

2. UNIX for Dummies Questions & Answers

Explanation of the sort command

Hi everyone, I am wondering if someone could please break down and explain the following sort command for me: ls ${DEST_LOCATION}/${FILES} | sort -rt -k 4,4n | head -1 I have tried working it out using 'man sort', but on AIX there is not a great explanation of this function. I know that... (9 Replies)
Discussion started by: jimbojames
9 Replies

3. AIX

about detail scope in AIX

I am mac end user learn some shell and applescripting I am looking AIX as system admin as career and learning AIX p520 what is scope of AIX as admin and about technology in demand in market I am confused, can anybody from AIX elaborate or mail me some experience please: (1 Reply)
Discussion started by: himanshuk
1 Replies

4. Cybersecurity

Check login detail

As a root user i switch to a different user say "oratest". I would like to know the details like at what time did the switch ( su - oratest ) happen. Are there any logs to check this Thanks. (2 Replies)
Discussion started by: jjoy
2 Replies

5. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

6. UNIX for Dummies Questions & Answers

Product instalaltion detail

Hi all experts, I want to find out what oracle product has come with the server and their version detail. We have Solaris 10. Can you tell me what Unix command will full fill this requirement? Thanks, AJ -----Post Update----- please help -----Post Update----- please help guys (1 Reply)
Discussion started by: ma466
1 Replies

7. Solaris

Patch detail and link

Hi All, My system patch detail is below Generic_12712-11 sun4u . can you please, what patch level is needed and where can i get it . Thanks (9 Replies)
Discussion started by: kumarmani
9 Replies

8. Shell Programming and Scripting

sort utility in script ?

Hi friends, I want to use sort command in script. I used the following syntax in my scipt, sort -t '|' +3 tempcdrext4.cdr > temp.mocdr It give me a error " Input file specified two times." but this command work fine in the prompt without any problem. Can sombody please tell me who... (2 Replies)
Discussion started by: maheshsri
2 Replies

9. UNIX for Advanced & Expert Users

what does metaroot in detail?

I have a problem with a submirror of the root filesystem, in the procedure in order to unmirror the FS say: metadetach -f d0 d20 metaroot c0t0d0s0 but, in my system the metaroot cause a segmentation fault coredump. I knew that the command modify the /etc/system and the /etc/vfstab. I try... (3 Replies)
Discussion started by: hugo_perez
3 Replies

10. UNIX for Dummies Questions & Answers

Getting detail out of a log file...

I'd like to peruse a log file and from it generate another file from the first instance of "Jul 11" to the first instance of "Jul 18" within the log file. (3 Replies)
Discussion started by: Cameron
3 Replies
Login or Register to Ask a Question