Sponsored Content
Top Forums Shell Programming and Scripting Extract repetead values in date range Post 303002718 by jiam912 on Thursday 31st of August 2017 05:58:50 AM
Old 08-31-2017
Extract repetead values in date range

Gents,

Using the following values:
Code:
3687650458 08/29/2017 1.67581
3687650388 08/29/2017 1.67581
3687650330 08/29/2017 1.67581
3687650330 08/29/2017 1.67581
3687650330 08/28/2017 2.67581
3687650330 08/28/2017 2.67581
3687650330 08/27/2017 3.67581
3687650330 08/27/2017 3.67581
3687650330 08/26/2017 4.67581
3687650330 08/26/2017 4.67581
3687650330 08/25/2017 5.67581
3687650330 08/25/2017 5.67581
3687650330 08/24/2017 6.67581
3687650330 08/24/2017 6.67581
3687650330 08/23/2017 7.67581
3687649144 08/29/2017 1.67581
3687649144 08/29/2017 1.67581
3687649144 08/28/2017 2.67581
3687649144 08/28/2017 2.67581
3687649144 08/27/2017 3.67581
3687649144 08/27/2017 3.67581
3687649144 08/26/2017 4.67581
3687649144 08/26/2017 4.67581
3687649144 08/25/2017 5.67581
3687649144 08/25/2017 5.67581
3687649144 08/24/2017 6.67581
3687649144 08/24/2017 6.67581
3687649144 08/23/2017 7.67581
3686449774 08/25/2017 5.67581
3686449774 08/24/2017 6.67581
3686449774 08/24/2017 6.67581
3686449774 08/23/2017 7.67581
3685250156 08/29/2017 1.67581
3685250156 08/29/2017 1.67581
3685250156 08/28/2017 2.67581
3685250156 08/28/2017 2.67581
3685250156 08/27/2017 3.67581
3685250156 08/27/2017 3.67581
3685250156 08/26/2017 4.67581
3685250156 08/26/2017 4.67581
3685250156 08/25/2017 5.67581
3685250156 08/25/2017 5.67581
3685250156 08/24/2017 6.67581
3685250156 08/24/2017 6.67581
3685250156 08/23/2017 7.67581
3685250108 08/29/2017 1.67581
3685250108 08/29/2017 1.67581
3685250108 08/28/2017 2.67581
3685250108 08/28/2017 2.67581
3685250108 08/27/2017 3.67581
3685250108 08/27/2017 3.67581
3685250108 08/26/2017 4.67581

Desired output
Code:
3687650330 08/23/2017 08/29/2017 7
3687649144 08/23/2017 08/29/2017 7
3685250156 08/23/2017 08/29/2017 7
3685250108 08/26/2017 08/29/2017 4

The required data in output are the minimum and maximum date where the same value in column is repeated during this days.. the column 3 is the difference between the 2 dates.. .

As u notice I need only the values which are more than 3 days repeated and always keep only the last date in this case
Code:
08/29/2017

.

Example i don't extract the value below because the repeated values are not ending with date
Code:
08/29/2017

.
Code:
3686449774 08/23/2017 08/25/2017 3

Please help, thanks..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to extract a range of lines from a file

I am reading a file that contains over 5000 lines and I want to assign it to a shell variable array (which has a restriction of 1024 rows). I had an idea that if I could grab 1000 record hunks of the file, and pipe the records out, that I could perform a loop until I got to the end and process 1000... (5 Replies)
Discussion started by: beilstwh
5 Replies

2. Shell Programming and Scripting

Get date range between 2 date input

Hi Experts, I have files name report_20090416 report_20090417 report_20090418 report_20090420 report_20090421 I have 2 input from user From Date: 20090417 To Date: 20090420 and I need to grep only those line in between. Output should be report_20090417 report_20090418... (3 Replies)
Discussion started by: tanit
3 Replies

3. Shell Programming and Scripting

Perl code to extract data from the range of date

Hi All, I'm still a newbie in perl programming. I have a data below say in test.tmp The output in test.tmp will be the same data as above sample in test.tmp . So after i get all the 4th column data within the range of month and year i need, then i will use the foreach () code to execute... (1 Reply)
Discussion started by: miskin
1 Replies

4. Shell Programming and Scripting

To Create range of values

Hi, I have a file with the below like values with integers only in sorted order (May or may not be in sequence) Eg: File1.txt ----------- 1 2 3 4 5 6 . . . . . 10000 My requirement here is to create a range of values out put to a temp k (4 Replies)
Discussion started by: shiva447
4 Replies

5. Shell Programming and Scripting

extract number range from a file

Hi Everyone, a.txt 1272904667;1272904737;1 1272904747;1272904819;1 1272904810;1272904857;1 1272904889;1272904926;1 1272905399;1272905406;1 1272905411;1272905422;1 if i want to get the record, when the a.txt 1st field is between 1272904749 and 1272905399, any simple way by using awk,... (1 Reply)
Discussion started by: jimmy_y
1 Replies

6. Shell Programming and Scripting

Awk extract a range of values

Hi Input 10 131 11 179 11 170 20 142 20 131 20 144 21 178 22 155 22 196 23 144 23 184 24 194 24 191 24 218 25 167 25 131 26 189 (6 Replies)
Discussion started by: genehunter
6 Replies

7. Programming

grepping a range of values

I need to return all records in a file starting with a row that says TABLE: <tabl name> lists of hexadecimal records TABLE: <some table> TABLe is a key word in the file. I know the name of the table I want to start with. I do not know the name of the table that I will end with. I just... (4 Replies)
Discussion started by: guessingo
4 Replies

8. Shell Programming and Scripting

Convert Column Values to a Range of Values

I have a list of columns with values that I need to transform into a row containing the range of each column. For example: "Column A" 1 2 3 4 10 12 14 15 16 17 18 "Column B" 1 4 5 6 (4 Replies)
Discussion started by: newbio
4 Replies

9. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies

10. Shell Programming and Scripting

Create range of values and count values.

Gents, It is possible to generate a range of values according to column 1 and count the total of rows in the range. example input 15.3 15.5 15.8 15.9 16.0 16.1 16.8 17.0 17.5 18.0 output desired 15.0 - 15.9 = 4 (10 Replies)
Discussion started by: jiam912
10 Replies
CONFIG.SUB(1)							   User Commands						     CONFIG.SUB(1)

NAME
config.sub - validate and canonicalize a configuration triplet SYNOPSIS
config.sub [OPTION] CPU-MFR-OPSYS or ALIAS DESCRIPTION
Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit REPORTING BUGS
Report bugs and patches to <config-patches@gnu.org>. COPYRIGHT
Copyright 1992-2016 Free Software Foundation, Inc. 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. SEE ALSO
autoconf(1), automake(1), autoreconf(1), autoupdate(1), autoheader(1), autoscan(1), config.guess(1), config.sub(1), ifnames(1), libtool(1). GNU Autoconf 2.69 August 2017 CONFIG.SUB(1)
All times are GMT -4. The time now is 10:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy