Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sorting list of files per date column Post 302255139 by shivaastrogun on Thursday 6th of November 2008 01:27:02 AM
Old 11-06-2008
Sorting list of files per date column

Hi all,

I have a pecular issue in sorting these files (not an ls -lrt) in Solaris environment.

All the below files are modified on November 4th, but I want to sort these files as per date (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@hotmail.com
Smilie

Last edited by shivaastrogun; 11-06-2008 at 12:53 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting Files by date and moving files in date order

I need to build a k shell script that will sort files in a directory where files appear like this "XXXX_2008021213.DAT. I need to sort by date in the filename and then move files by individual date to a working folder. concatenate the files in the working folder then start a process once... (2 Replies)
Discussion started by: rebel64
2 Replies

2. UNIX for Dummies Questions & Answers

Get the list of files for a given date

Hi, the command "ls -l" gives the list of files of a directory with details such as date and size. Is there a way to restrict this list to see only files created on a given date? Suppose I want to list only the files created today, what is the command to type? Thanks (3 Replies)
Discussion started by: vanagreg
3 Replies

3. UNIX for Advanced & Expert Users

Help with sorting files according to modification date

Hi, I was very surprised to not be able to find an answer to this question despite my best efforts in Google and elsewhere. Maybe it's a good thing as it forced me to finally become a member in this great forum that i use frequently. Ok my question: I want to be able to sort files inside a... (3 Replies)
Discussion started by: stavros
3 Replies

4. Shell Programming and Scripting

[SOLVED] Sorting into new files based on column

Hi, I have the following file, I need to sort it based on a column and write to different output files based on this column request_guid iso_country_cd address_data response_time 32895901-d17f-414c-ac93-3e7e0f5ec240 AND BaseName:CATALUNYA; HouseNumber:1; ISOCountryCode:AND;... (1 Reply)
Discussion started by: ramky79
1 Replies

5. Shell Programming and Scripting

[Solved] Sorting a column based on another column

hello, I have a file as follows: F0100010 A C F0100040 A G BTA-28763-no-rs 77.2692 F0100020 A G F0100030 A T BTA-29334-no-rs 11.4989 F0100030 A T F0100020 A G BTA-29515-no-rs 127.006 F0100040 A G F0100010 A C BTA-29644-no-rs 7.29827 F0100050 A... (9 Replies)
Discussion started by: Homa
9 Replies

6. Shell Programming and Scripting

Finding files and sorting by date (find | awk)

I am wanting to search a directory tree and return files that are older than a specified datetime. So far straight forward with find, now I want to sort in date order and format the output. So far I have this, but is not working and there is a problem with "." in the file and/or path names. ... (2 Replies)
Discussion started by: larry2311
2 Replies

7. UNIX for Dummies Questions & Answers

Creating a two column list of date pairs form a single column list

Hi all, looking for some help here. I'm what you'd call a dirty programmer. my shell scripts might be ugly, but they (usually) function... Say I have a single column text file with a list of dates (yyyymmdd) that represent the elevation of a point on that date (I work with land subsidence, so... (2 Replies)
Discussion started by: jbrandt1979
2 Replies

8. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

9. UNIX for Dummies Questions & Answers

Date column validation in files

HI, i have to do some file validations on which i am receving daily.could any one please let me know how we can able to do validations on below scenarios 1) On Date column Ex If i am receving date in format of YYYYMMDD---- 20141118 --- here i have to check the date value 20141142 if the... (7 Replies)
Discussion started by: bhaskar v
7 Replies

10. Shell Programming and Scripting

List the files after sorting based on file content

Hi, I have two pipe separated files as below: head -3 file1.txt "HD"|"Nov 11 2016 4:08AM"|"0000000018" "DT"|"240350264"|"56432" "DT"|"240350264"|"56432" head -3 file2.txt "HD"|"Nov 15 2016 2:18AM"|"0000000019" "DT"|"240350264"|"56432" "DT"|"240350264"|"56432" I want to list the... (6 Replies)
Discussion started by: Prasannag87
6 Replies
GNUPG_ENCRYPTSIGN(3)							 1						      GNUPG_ENCRYPTSIGN(3)

gnupg_encryptsign - Encrypts and signs a given text

SYNOPSIS
string gnupg_encryptsign (resource $identifier, string $plaintext) DESCRIPTION
Encrypts and signs the given $plaintext with the keys, which were set with gnupg_addsignkey and gnupg_addencryptkey before and returns the encrypted and signed text. PARAMETERS
o $identifier -The gnupg identifier, from a call to gnupg_init(3) or gnupg. o $plaintext - The text being encrypted. RETURN VALUES
On success, this function returns the encrypted and signed text. On failure, this function returns FALSE. EXAMPLES
Example #1 Procedural gnupg_encryptsign(3) example <?php $res = gnupg_init(); gnupg_addencryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC"); gnupg_addsignkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test"); $enc = gnupg_encryptsign($res, "just a test"); echo $enc; ?> Example #2 OO gnupg_encryptsign(3) example <?php $gpg = new gnupg(); $gpg -> addencryptkey("8660281B6051D071D94B5B230549F9DC851566DC"); $gpg -> addsignkey("8660281B6051D071D94B5B230549F9DC851566DC","test"); $enc = $gpg -> encryptsign("just a test"); echo $enc; ?> PHP Documentation Group GNUPG_ENCRYPTSIGN(3)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy