Sponsored Content
Top Forums Shell Programming and Scripting How to sort a field in a file having date values Post 302202089 by risshanth on Wednesday 4th of June 2008 03:56:06 AM
Old 06-04-2008
I have used a small file for testing

A line in the file looks like thsi
deepak|55445|12-02-2008|alappuzha
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Sort files on date field

: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)
Discussion started by: shivaastrogun
4 Replies

2. Shell Programming and Scripting

Sort two columns in a field, one of them being a date

Hi, I have a set of columns in a csv file, my first row being an integer and 2nd being a date. I want to first sort it using the first column and then by the second. for e.g. i have , 1234,09/05/2009,hi 5678,01/01/2008,hi 1234,11/03/2006,hello 5678,28/07/2010,hello i tried this... (5 Replies)
Discussion started by: sweta_doshi
5 Replies

3. Shell Programming and Scripting

how to sort date in decimal values uptp two digits

Hi all, there is a data in a file wich loks likes 00:00:49|24.48| 00:01:49|22.83| 00:02:49|22.07| 00:03:49|20.72| 00:04:49|21.28| 00:05:49|21.22| 00:06:49|21.38| 00:07:49|20.93| 00:08:49|21.27| 00:09:49|20.65| 00:10:49|19.42| 00:11:49|21.93| 00:12:49|20.62| 00:13:49|20.23|... (3 Replies)
Discussion started by: jojo123
3 Replies

4. UNIX for Dummies Questions & Answers

Sort field by date mm/dd/yyyy

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)
Discussion started by: csierra
6 Replies

5. Shell Programming and Scripting

Sorting Date Field with Sort -k :/

SOLVED : (17 Replies)
Discussion started by: Glitch100
17 Replies

6. Shell Programming and Scripting

Sort help: How to sort collected 'file list' by date stamp :

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)
Discussion started by: rveri
3 Replies

7. Linux

How do I format a Date field of a .CSV file with multiple commas in a string field?

I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below: column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10 "12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Discussion started by: dhruuv369
3 Replies

8. AIX

Sort by date field in AIX

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

9. Shell Programming and Scripting

Sort file by field 1 that has text as well as a number

I am using the below awk that results in the below output: awk '{k=$1 OFS $2; s+=$4; c++} END{for(i in s) print i, s/c}' input.txt > output.txt output.txt chr20:43625799-43625957 STK4:exon.6;STK4:exon.7 310.703 chr20:36770455-36770611 TGM2:exon.6;TGM2:exon.7 614.756... (5 Replies)
Discussion started by: cmccabe
5 Replies
DateTime::Locale::ku(3) 				User Contributed Perl Documentation				   DateTime::Locale::ku(3)

NAME
DateTime::Locale::ku SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'ku' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Kurdish. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) 2 3 4 5 6 7 1 Abbreviated (format) 2 3 4 5 6 7 1 Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) 2 3 4 5 6 7 1 Abbreviated (stand-alone) 2 3 4 5 6 7 1 Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) 1 2 3 4 5 6 7 8 9 10 11 12 Abbreviated (format) 1 2 3 4 5 6 7 8 9 10 11 12 Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Abbreviated (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated BCE CE Narrow BCE CE Date Formats Full 2008-02-05T18:30:30 = 3, 2008 2 05 1995-12-22T09:05:02 = 6, 1995 12 22 -0010-09-15T04:44:23 = 7, -10 9 15 Long 2008-02-05T18:30:30 = 2008 2 5 1995-12-22T09:05:02 = 1995 12 22 -0010-09-15T04:44:23 = -10 9 15 Medium 2008-02-05T18:30:30 = 2008 2 5 1995-12-22T09:05:02 = 1995 12 22 -0010-09-15T04:44:23 = -10 9 15 Short 2008-02-05T18:30:30 = 2008-02-05 1995-12-22T09:05:02 = 1995-12-22 -0010-09-15T04:44:23 = -010-09-15 Default 2008-02-05T18:30:30 = 2008 2 5 1995-12-22T09:05:02 = 1995 12 22 -0010-09-15T04:44:23 = -10 9 15 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = 3, 2008 2 05 18:30:30 UTC 1995-12-22T09:05:02 = 6, 1995 12 22 09:05:02 UTC -0010-09-15T04:44:23 = 7, -10 9 15 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008 2 5 18:30:30 UTC 1995-12-22T09:05:02 = 1995 12 22 09:05:02 UTC -0010-09-15T04:44:23 = -10 9 15 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008 2 5 18:30:30 1995-12-22T09:05:02 = 1995 12 22 09:05:02 -0010-09-15T04:44:23 = -10 9 15 04:44:23 Short 2008-02-05T18:30:30 = 2008-02-05 18:30 1995-12-22T09:05:02 = 1995-12-22 09:05 -0010-09-15T04:44:23 = -010-09-15 04:44 Default 2008-02-05T18:30:30 = 2008 2 5 18:30:30 1995-12-22T09:05:02 = 1995 12 22 09:05:02 -0010-09-15T04:44:23 = -10 9 15 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 3 1995-12-22T09:05:02 = 22 6 -0010-09-15T04:44:23 = 15 7 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = 3, 2-5 1995-12-22T09:05:02 = 6, 12-22 -0010-09-15T04:44:23 = 7, 9-15 MMM (LLL) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 MMMd (MMM d) 2008-02-05T18:30:30 = 2 5 1995-12-22T09:05:02 = 12 22 -0010-09-15T04:44:23 = 9 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = 3 2 5 1995-12-22T09:05:02 = 6 12 22 -0010-09-15T04:44:23 = 7 9 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = 2 5 1995-12-22T09:05:02 = 12 22 -0010-09-15T04:44:23 = 9 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = 3 2 5 1995-12-22T09:05:02 = 6 12 22 -0010-09-15T04:44:23 = 7 9 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = 3, 2008-2-5 1995-12-22T09:05:02 = 6, 1995-12-22 -0010-09-15T04:44:23 = 7, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 2 1995-12-22T09:05:02 = 1995 12 -0010-09-15T04:44:23 = -10 9 yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = 3, 2008 2 5 1995-12-22T09:05:02 = 6, 1995 12 22 -0010-09-15T04:44:23 = 7, -10 9 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 2 1995-12-22T09:05:02 = 1995 12 -0010-09-15T04:44:23 = -10 9 yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week 2 SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.2 2013-08-25 DateTime::Locale::ku(3)
All times are GMT -4. The time now is 02:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy