Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Deleting file basing on the timestamp substring in the file name Post 302888758 by bakunin on Monday 17th of February 2014 07:23:23 AM
Old 02-17-2014
Quote:
Originally Posted by thuyetti
May I ask you to explain me about " $TS -gt $some_int -a $TS -lt $other_int " .
You might want to look at the man page of "test":

-lt: "lower than", checks if value1 is lower than value2
-a: "logical and" connects two conditions with an AND
-gt: "greater than", checks if value1 is greater than value2

So in fact it reads ...if $TS is greater than $some_int AND $TS is lower than $other_int, "some_int > TS > other_int", for short.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Deleting timestamp using sed command

Hi, I'm trying to compare Actual.html with a baseline.html However, everytime it fails b'coz of the timestamp differences between the two. So, thought of stripping off the timestamp from both the *html files before comparing using below sed command over Solaris Unix platform:... (3 Replies)
Discussion started by: elearn.latha
3 Replies

2. UNIX for Dummies Questions & Answers

deleting file with timestamp

I am using UNIX from few months, I want to delete files in subdirectories that have a timestamp till yesterday. I mean all the files before Jan 10th... can I just give find and do it or how do I do it??? (2 Replies)
Discussion started by: jcluvme
2 Replies

3. Shell Programming and Scripting

Split a binary file into 2 basing on 2 delemiter string

Hi all, I have a binary file (orig.dat) and two special delimiter strings 'AAA' and 'BBB'. My binary file's content is as follow: <Data1.1>AAA<Data1.2>BBB <Data2.1>AAA<Data2.2>BBB ... <DataN.1>AAA<DataN.2>BBB DataX.Y might have any length, and contains any kind of special/printable... (1 Reply)
Discussion started by: Averell
1 Replies

4. Shell Programming and Scripting

Split a single file into several others basing on the last column

Hi folks, Happy new year. I have a file 'filename' that i wd like to split basing on the contents in the last column. The 'filename' content looks like 256772744788,9,11 256772744805,9,11 256772744792,9,11 256775543055,10,12 256782625357,9,12 256772368953,10,13 256772627735,10,13... (3 Replies)
Discussion started by: jerkesler
3 Replies

5. UNIX for Dummies Questions & Answers

Need help finding a file where a pattern exists and the file has a timestamp

So, I know how to do some of this stuff on an individual level, but I'm drawing a blank as to how to put it all together. I have a pattern that I'm looking for in a log file. The log file I know came in yesterday, so I want to limit the search to that day's listing of files. How would I do... (5 Replies)
Discussion started by: kontrol
5 Replies

6. Shell Programming and Scripting

Getting a relative timestamp from timestamp stored in a file

Hi, I've a file in the following format 1999-APR-8 17:31:06 1500 3 45 1999-APR-8 17:31:15 1500 3 45 1999-APR-8 17:31:25 1500 3 45 1999-APR-8 17:31:30 1500 3 45 1999-APR-8 17:31:55 1500 3 45 1999-APR-8 17:32:06 1500 3 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies

7. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

8. UNIX for Dummies Questions & Answers

Deleting files based on Substring match

In folder there are files (eg ABS_18APR2012_XYZ.csv DSE_17APR2012_ABE.csv) . My requirement is to delete all the files except today's timestamp I tried doing this to list all the files not having today's date timestamp #!/bin/ksh DATE=`date +"%d%h%Y"` DIR=/data/rfs/... (9 Replies)
Discussion started by: manushi88
9 Replies

9. Shell Programming and Scripting

Pick a line in file 2 basing on array in file1

Dear friends, I have two files. One with all IDs(in a single field) . And another with data(of which say field 5 is ID). I want to create an array of IDs using first file and while reading second file if the ID appears in the array I need to print $0 else skip. After a long gap I am... (6 Replies)
Discussion started by: paresh n doshi
6 Replies

10. Shell Programming and Scripting

Picking the latest file based on a timestamp for a Dynamic file name

Hi , I did the initial search but could not find what I was expecting for. 15606Always_9999999997_20160418.xml 15606Always_9999999998_20160418.xml 15606Always_9999999999_20160418.xml 9819Always_99999999900_20160418.xml 9819Always_99999999911_20160418.xmlAbove is the list of files I... (4 Replies)
Discussion started by: chillblue
4 Replies
SEXTRACTOR(1)							   User Commands						     SEXTRACTOR(1)

NAME
sextractor - extract a source catalog from an astronomical FITS image SYNOPSIS
sextractor image [-c configuration-file] [-parameter1 value1 -parameter2 value2 ...] sextractor image_detect image_measure [-c configuration-file] [-parameter1 value1 -parameter2 value2 ...] sextractor -d DESCRIPTION
SExtractor is a program that builds a catalogue of objects from an astronomical image. Although it is particularly oriented towards reduc- tion of large scale galaxy-survey data, it performs rather well on moderately crowded star fields. On Debian systems, sample SExtractor parameter files are installed to /usr/share/sextractor. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -d, --dump dump a default configuration file EXAMPLE
For a minimal sextractor run, without customizing any of the parameters, use sextractor file.fits -c /usr/share/sextractor/default.sex -PARAMETERS_NAME /usr/share AUTHOR
Written by Emmanuel Bertin (Institut d'Astrophysique de Paris and Observatoire de Paris). Copyright 1994-2005 Emmanuel Bertin This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. REPORTING BUGS
Report bugs to <sextractor@iap.fr>. The full documentation for SExtractor is maintained as a Postscript manual available at http://terapix.iap.fr/soft/sextractor ; on Debian systems, it is also installed to /usr/share/doc/sextractor/. SExtractor 2.8.6 January 2013 SEXTRACTOR(1)
All times are GMT -4. The time now is 11:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy