Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Explanation for sort utility and its detail Post 303013170 by RudiC on Friday 16th of February 2018 08:05:45 AM
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).
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SORT(1) 							   User Commands							   SORT(1)

NAME
sort - sort lines of text files SYNOPSIS
sort [OPTION]... [FILE]... DESCRIPTION
Write sorted concatenation of all FILE(s) to standard output. Mandatory arguments to long options are mandatory for short options too. Ordering options: -b, --ignore-leading-blanks ignore leading blanks -d, --dictionary-order consider only blanks and alphanumeric characters -f, --ignore-case fold lower case to upper case characters -g, --general-numeric-sort compare according to general numerical value -i, --ignore-nonprinting consider only printable characters -M, --month-sort compare (unknown) < `JAN' < ... < `DEC' -n, --numeric-sort compare according to string numerical value -r, --reverse reverse the result of comparisons Other options: -c, --check check whether input is sorted; do not sort -k, --key=POS1[,POS2] start a key at POS1, end it at POS2 (origin 1) -m, --merge merge already sorted files; do not sort -o, --output=FILE write result to FILE instead of standard output -s, --stable stabilize sort by disabling last-resort comparison -S, --buffer-size=SIZE use SIZE for main memory buffer -t, --field-separator=SEP use SEP instead of non-blank to blank transition -T, --temporary-directory=DIR use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories -u, --unique with -c, check for strict ordering; without -c, output only the first of an equal run -z, --zero-terminated end lines with 0 byte, not newline --help display this help and exit --version output version information and exit POS is F[.C][OPTS], where F is the field number and C the character position in the field. OPTS is one or more single-letter ordering options, which override global ordering options for that key. If no key is given, use the entire line as the key. SIZE may be followed by the following multiplicative suffixes: % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y. With no FILE, or when FILE is -, read standard input. *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values. AUTHOR
Written by Mike Haertel and Paul Eggert. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2005 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for sort is maintained as a Texinfo manual. If the info and sort programs are properly installed at your site, the command info sort should give you access to the complete manual. sort 5.93 November 2005 SORT(1)
All times are GMT -4. The time now is 07:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy