Sponsored Content
Top Forums Shell Programming and Scripting Needed script to generate versions for a file and maintian them in a folder Post 302745349 by hemanthsaikumar on Monday 17th of December 2012 06:57:42 AM
Old 12-17-2012
i have three 5 version files in the folder as follows
Code:
testing_15122012.txt
testing_15122012.txt
testing_15122012.txt
testing_15122012.txt
testing_15122012.txt
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt

i want the output as
Code:
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_16122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt
testing_17122012.txt

the output should contain the present and last past version of the files...
the deletion should be done based on date and timestamp (as it should store the present and past one version of the files..)

Moderator's Comments:
Mod Comment Use code tags, thanks. See PM.

Last edited by zaxxon; 12-17-2012 at 08:46 AM.. Reason: modification in question..
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to generate nested folder permissions

Hi expert, I would like to know how to generate file and folder ( including nested subfolder and files) permissions under oracle directory ? (8 Replies)
Discussion started by: skully
8 Replies

2. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

3. UNIX for Dummies Questions & Answers

Help needed, linking to file in different sub-folder

Hello, I'd really like some help on this, a PERL-CGI script (complete working script is below). How can I add the server's root folder (folder_f) to this: ~ s/_e\.shtml/_f\.shtml/ This bit of code searches all occurences of _e.shtml and replaces them with _f.shtml (it being in the same... (1 Reply)
Discussion started by: fredfletcher
1 Replies

4. Shell Programming and Scripting

Script to maintain file versions

I am developing a script to maintain 'n' number of versions of a file. The script will take a filename as a parameter and the number of versions to maintain. This basically does something like a FIFO. Here is what I developed. But something is not right. I have attached the script. Can u pls help... (2 Replies)
Discussion started by: vskr72
2 Replies

5. Shell Programming and Scripting

Needed script to FTP a File and generate a quality checksum file

hi all i want a script to FTP a file and should generate a quality checksum file means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file Thanks in advance saikumar (3 Replies)
Discussion started by: hemanthsaikumar
3 Replies

6. Shell Programming and Scripting

Help with korn shell script to get the latest file versions in a directory

I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Discussion started by: maheshbabu
4 Replies

7. UNIX for Dummies Questions & Answers

Need script to generate file.

Hi I have a file "test" with data as below 1,APRIL,NEW,"New market,delhi,pune,India",RECENT, 254664 2,MARCH,OLD,"New Area,Mumbai,UP,India",CURRENT, 152483 So I want a script which provides output as below 1,APRIL,RECENT,254664 2,MARCH,CURRENT,152483 I am aware we can use awk/sed... (9 Replies)
Discussion started by: sv0081493
9 Replies

8. Shell Programming and Scripting

Script to generate csv file

Dears, I am new in shell world and I need your help in this, I have to create a report based on the output file generated by another program. I want to write a shell script for this. The output file generated every 15 minutes but i can’t open it until the end of day so the script will get the... (3 Replies)
Discussion started by: abdul2020
3 Replies
ATR_ANALYSIS(1p)                                                   User Commands                                                  ATR_ANALYSIS(1p)

NAME
ATR_analysis - analyse a smart card ATR SYNOPSIS
ATR_analysis [ATRstring] DESCRIPTION
ATR_analysis is used to parse the ATR (Answer To Reset) sent by a smart card. The command also tries to find the card model using an ATR database stored in a text file smartcard_list.txt. The smartcard_list.txt file is searched in ./, /usr/local/pcsc/ and /usr/share/pcsc/ directories. Exemple: $ ATR_analysis '3B A7 00 40 18 80 65 A2 08 01 01 52' ATR: 3B A7 00 40 18 80 65 A2 08 01 01 52 + TS = 3B --> Direct Convention + T0 = A7, Y(1): 1010, K: 7 (historical bytes) TB(1) = 00 --> Programming Param P: 0, I: 0 TD(1) = 40 --> Y(i+1) = 0100, Protocol T = 0 ----- TC(2) = 18 --> Work waiting time: 960 x 24 x (Fi/F) + Historical bytes: 80 65 A2 08 01 01 52 Possibly identified card: 3B A7 00 40 18 80 65 A2 08 01 01 52 Gemplus GPK8000 BUGS
Maybe many bugs since I am not a ISO 7816 expert. FILES
smartcard_list.txt SEE ALSO
pcscd(8), pcsc_scan(1) AUTHOR
Ludovic Rousseau <ludovic.rousseau@free.fr> Version: 1.3 October 2005 ATR_ANALYSIS(1p)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy