hello,
i have a table contain many columns delimited by blank.
i want to sort this table by the 2 columns and 3 one and i want to keep the first line inchanged?
how can i do using the sort command?
thanks
table like :
field1 field2 field3 field4
x y z b
t h r n
.. (4 Replies)
Hi All,
I am having a pipe delimited file .In this file the 3rd column is having date values.I need to get the min date and max date from that file.
I have used
cut -d '|' test.dat -f 3|sort -u
But it is not sorting the date .How to sort the date column using unix commands
Thanks ... (4 Replies)
:cool:
Hi all,
I have a pecular issue in sorting these files in Solaris environment.
All the below files are modified on November 4th, but I want to sort these files as per date column (eg: 01May07_1623 = ddmmmyy_hhmm)
Nov 4 18:27 SONYELEC00.GI22973.01May07_1623.gpg
Nov 4 18:27... (4 Replies)
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla
abc ||| 3 ||| ble
def ||| 1 ||| abc
def ||| 0.2 ||| def
As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Hello Group,
I would like to sort the below file by date (first year then month and day) and I used the following command but it does not work
sort -n -t"/" -k3 -k1 -k2
"sample original file"
12/28/2009,1.0353
12/31/2009,1.0357
12/30/2009,1.0364
12/29/2009,1.0366
12/24/2009,1.0386... (6 Replies)
Hi colleagues,
I have this output, i need sort for 7th and 8th columns, the column 7th is date mm/dd/yyyy format and column 8th is time hh:mm:ss.number
PRUEBA 1263 0007 1 0 7131292 03/25/2013 16:43:04.159976 PROCESS
PRUEBA1 666 0146 1 0 11600064 ... (1 Reply)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
New to unix.
I need to sort the records of a file by a control number field. That field is in POS 16 through 28. How do I do that? There are no delimiters, or spaces to separate fields.
See example below. Each line is a record.
REC1CCYYMMDD0018888888888888ABCDE... (1 Reply)
I wanted to sort the below data on 4th field(comma seperator) based on month and date and time on AIX OS.
Input data:
3,AJ,30 Jul 06:30,30 Jul 06:30
5,AJ,30 Jul 06:30,30 Jul 06:49
10,AJ,30 Jul 06:30,02 Jan 05:41
4,AJ,30 Jul 06:30,30 Jul 06:36
2,AJ,30 Jul 06:30,28 Jul 06:45
9,AJ,30 Jul... (2 Replies)
Discussion started by: Amit Joshi
2 Replies
LEARN ABOUT REDHAT
column
COLUMN(1) BSD General Commands Manual COLUMN(1)NAME
column -- columnate lists
SYNOPSIS
column [-tx] [-c columns] [-s sep] [file ...]
DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by
default, from the standard input. Empty lines are ignored.
The options are as follows:
-c Output is formatted for a display columns wide.
-s Specify a set of characters to be used to delimit columns for the -t option.
-t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with
the characters supplied using the -s option. Useful for pretty-printing displays.
-x Fill columns before filling rows.
Column exits 0 on success, >0 if an error occurred.
ENVIRONMENT
COLUMNS The environment variable COLUMNS is used to determine the size of the screen if no other information is available.
EXAMPLES
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY HH:MM/YEAR NAME
"
; ls -l | sed 1d) | column -t
SEE ALSO colrm(1), ls(1), paste(1), sort(1)HISTORY
The column command appeared in 4.3BSD-Reno.
BSD June 6, 1993 BSD