I need some help with the logic and syntax for a shell script (ksh) that will search a directory and look for similar files and save only the 5 versions. The version number is in the file name.
However, the files are of varying name lengths and may have 1 or many files, with no limit to the number of files.
the input file
the output should contain the present and past one file
i used the below code please sugest the correct script
From you question, I presume that the file name uses the date in the format ddmmyyyy, and that makes it a little tricky. Better to use yyyymmdd if you can, so the most significant digits are first. If you are stuck with that, can you be sure that the files (once complete) are not edited?
If so, you could:-
If the file timestamps cannot be guaranteed, you could change the date format in the file name, then it is a much easier sort:-
This format of sort may have been superseded by now, so check your manual pages for sort to be sure.
I hope that this helps,
Robin
Liverpool/Blackburn
---------- Post updated at 02:34 PM ---------- Previous update was at 02:32 PM ----------
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)
Hi,
Need Shell script to download the file with version or date from internet
Filename will be as
Eg:File-2.3.1.zip
Filename will keep on changing for every 4months as File-2.3.2 or File 2.4
Thanks,
Anil (4 Replies)
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)
I have tried thought of using instfix -ivqc | grep BIND , but this did not return the result I was looking for; it seem to list out the the different patches that had been applied to BIND. I'm actually looking for overall version, like you'd get when checking the OS level for instance. (1 Reply)
Trying to make a library and get this error :
*** Warning: This library needs some functionality provided by -lming32.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the... (1 Reply)