11-06-2008
How to Sort files on date field
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 SONYELEC00.GI22973.
06Mar08_1504.gpg
Nov 4 18:27 SONYELEC00.GI22973.06Sep07_1900.gpg
Nov 4 18:27 SONYELEC00.GI22973.08Nov07_1900.gpg
Nov 4 18:27 SONYELEC00.GI22973.13Aug07_1900.gpg
Nov 4 18:27 SONYELEC00.GI22973.19Apr07_1733.gpg
Nov 4 18:27 SONYELEC00.GI22973.22Jan08_1900.gpg
Nov 4 18:27 SONYELEC00.GI22973.24Apr07_1757.gpg
Nov 4 18:27 SONYELEC00.GI22973.26Jun08_1900.gpg
Nov 4 18:27 SONYELEC00.GI22974.01May07_1623.gpg
Nov 4 18:27 SONYELEC00.GI22974.13Aug07_1900.gpg
Nov 4 18:27 SONYELEC00.GI22974.19Apr07_1733.gpg
Nov 4 18:27 SONYELEC00.GI22974.24Apr07_1757.gpg
Appreciate your quick support
Thanks,
Shiva
shivadba@xxxxxx
Last edited by DukeNuke2; 11-06-2008 at 01:48 PM..
Reason: deleted mail...
10 More Discussions You Might Find Interesting
1. Linux
Hi All,
Sorry to throw this frequent question but I lost my notes on it.
How do you list the files by date? I'm on red hat.
Thanks in advance,
itik (1 Reply)
Discussion started by: itik
1 Replies
2. Shell Programming and Scripting
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)
Discussion started by: risshanth
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
i'm new here in this forum. I really like the helpful answers in this forum.
Here a short question.
For a script i have to sort files by date and exclude the files of the actual date.
Sorting the files by date and preparing the output for awk is done by this line:
ls -l... (3 Replies)
Discussion started by: carlosdivega
3 Replies
4. Shell Programming and Scripting
hi there,
I have a directory which contents I can parse dynamically. I end up with a file list. I then want to display those files sorted by date, oldest files first. I have very very little PERL experience...Would anyone know how to do that ? Thanks in advance. (8 Replies)
Discussion started by: alexf
8 Replies
5. Shell Programming and Scripting
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
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
Hi, I am a newbie to shell programming and I need some help in sorting a list of files in ascending order of date in the filenames.
The file format is always : IGL01_AC_D_<YYYYMMDD>_N01_01
For example, in a directory MyDirectory I have the following files:
IGL01_AC_D_20110712_N01_01.dat... (11 Replies)
Discussion started by: Yuggy
11 Replies
8. Shell Programming and Scripting
SOLVED : (17 Replies)
Discussion started by: Glitch100
17 Replies
9. UNIX for Dummies Questions & Answers
Here's a sample of the data:
NAME BIRTHDAY SEX LOCATION AGE ID
Jim 05/11/1986 M Japan 27 86
Rei 08/25/1990 F Korea 24 33
Jane 02/24/1985 F India 29 78
I've been trying to sort files using the... (8 Replies)
Discussion started by: maihani
8 Replies
10. 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
LEARN ABOUT DEBIAN
jetring
JETRING(7) jetring commands JETRING(7)
NAME
jetring - maintenance of gpg keyrings using changesets
OVERVIEW
jetring is a collection of tools that allow for gpg keyrings to be maintained using changesets. It was developed with the Debian keyring in
mind, and aims to solve the problem that a gpg keyring is a binary blob that's hard for multiple people to collaboratively edit.
With jetring, changesets can be submitted, reviewed to see exactly what they will do, applied, and used to build a keyring. The origin of
every change made to the keyring is available for auditing, and gpg signatures can be used to further secure things.
OPERATION
A jetring directory is used as the "source" that a keyring is built from. To convert an existing gpg keyring to such a directory, use the
jetring-explode(1) command.
Each change to the gpg keyring is stored in a separate changeset file in the directory. Changesets can reflect any set of changes to the
keyring. Changesets can also include arbitrary metadata. The jetring-gen(1) command can be used to compare two keyrings and generate a
changeset from one to the other.
Changesets are never removed or modified, only new ones added, using the jetring-accept(1) command.
There's an ordering of the changesets. This ordering is stored in an index file. The index file is only appended to, to add new changesets.
Changesets can be fully examined to see what change they make before applying them. The jetring-review(1) and jetring-diff(1) commands can
be used for such review.
To create a new keyring, or incrementally update an existing keyring, changesets are applied in order using the jetring-build(1) command.
GPG SIGNATURES
The index file can optionally be gpg signed (the signature will be stored in index.gpg); if JETRING_SIGN is set to point to a gpg keyring,
then jetring commands that operate on the jetring directory will always check that the index file is signed with one of the keys from that
keyring. Commands that modify the index file will update its signature.
CHANGESET FORMAT
A changeset file consists of one or more stanzas, separated by blank lines. The stanzas are in RFC-822-like format. Each stanza must have
an action field, which specifies which action to take on the keyring, and a data field, typically a multi-line field, which contains the
data to feed to the action. Supported actions are:
import The data field should be an ascii-armored gpg key block, that is fed into gpg --import.
edit-key keyid
gpg --edit-key is run on the specified key id. The data field is a script, each line in it is passed in to gpg, the same as if gpg
were being driven interactively. This can be used to make arbitrary changes to the key.
delete-key keyid
The given key is deleted. The data is fed into gpg --delete-key, and should be "y", since gpg expects that confirmation to deleting
a key.
Other fields can be added as desired to hold metadata about the change. Typical additional fields include date, changed-by, and comment.
Changesets can be optionally have attached signatures, although such data is not automatically validated and is mostly useful to record who
submitted or signed off on a given changeset.
AUTHOR
Joey Hess, <joey@kitenet.net>.
JETRING(7)