Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Delete records that do not belong to that day Post 303024551 by RudiC on Wednesday 10th of October 2018 06:29:14 PM
Old 10-10-2018
Try
Code:
awk -F, 'NR == 1 {("date -d\"" $2 "+1day\" +\"%d-%b-%Y\"") | getline DT} $2 !~ DT' file
a,31-Jul-2018 12:00,14
a,31-Jul-2018 12:01,13
a,31-Jul-2018 12:02,15
a,31-Jul-2018 12:03,19
and so on 
.
.
a,31-Jul-2018 11:59,6  
b,31-Jul-2018 12:00,7 
b,31-Jul-2018 12:01,7
b,31-Jul-2018 12:02,6
b,31-Jul-2018 12:03,3
and so on 
.
.
b,31-Jul-2018 11:59,8  
c,31-Jul-2018 12:00,7
c,31-Jul-2018 12:01,7
c,31-Jul-2018 12:02,6
c,31-Jul-2018 12:03,8

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete files one day old in current month only

i want to delete files that are one day old condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)} any modifications to find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Discussion started by: maverick
4 Replies

2. Shell Programming and Scripting

Hai delete the records

Hai all i want to grep the particular pattern and move the mathing records to torget file and delete the matching recodrs from source file. patterns are position based, like 13413432,aaaaaaa,dsfdddddd,34234324,22224555 13413432,aaaaaaa,dsfdddddd,12234324,11222455 i want to move the... (1 Reply)
Discussion started by: readycpbala
1 Replies

3. Shell Programming and Scripting

delete records from a file

I have a big file with "|" delimiter. I want to delete all the records that have 'abc' in the 2nd field. How can i do that? I am not abe to open it in VI that is why i need to do it from outside. Please suggest (6 Replies)
Discussion started by: dsravan
6 Replies

4. Shell Programming and Scripting

Not able to delete the files in day wise...

Dear All, I am not able to remove the files in my AIX 5.3 server. My files List /iims-home/data/uat1/batch/staging -rw-r--r-- 1 iims iims 5743 Jun 12 09:04 ErrorReport2008-05-20 09-04-18.doc -rw-r--r-- 1 iims iims 191213683 Jun 12 09:05... (1 Reply)
Discussion started by: bvijaycom
1 Replies

5. UNIX and Linux Applications

How to delete files with no records?

Hi, I have a file whose size is not zero but it has no records and another which has records. I want to delete all the files that have no records in it (even if size > 0). How do I do it? I have tried the below option #!/bin/ksh temp1 = $(wc -l < INVX102C.sf) if ; then echo "Data... (3 Replies)
Discussion started by: sangharsh
3 Replies

6. Shell Programming and Scripting

How to delete files which more than one Day old?

I have a directory /opt/targets which generates more than 1000 files per day and I want to delete all the files which are more than 1 day old...ie 24hrs+ Please help.. (3 Replies)
Discussion started by: sunilrk07
3 Replies

7. Shell Programming and Scripting

How to delete subdirectories that are more than 1 day old AND have NO files on them

Hi Experts , At a particular dir , How to delete subirectories that are more than 1 day old AND have NO files in them. PS : -empty option is not working at my Sun OS version. Thanks, A (6 Replies)
Discussion started by: ajaypatil_am
6 Replies

8. Shell Programming and Scripting

Delete the records from table

Hi, Can any one help me... the records are not deleting when I run the below script. But if I issue the same delete command manually, the records are getting deleted. script: #!/bin/ksh USAGE_STRING="USAGE $0 " if then echo "SORRY you need to be user 'mqm'. Only 'mqm' has... (5 Replies)
Discussion started by: zxcjggu708
5 Replies

9. Shell Programming and Scripting

To get Non matching records for current day

My objective is to get the non matching records of previous day with current day. eg, file1 contains 1 a 2 b and file2 contains: 2 b 3 c then expected output is 3 c¨ another example file 1 contains: 1 a 2 b file 2 contains 1 c 2 b (8 Replies)
Discussion started by: newbie2014
8 Replies

10. Shell Programming and Scripting

Delete file to day

friends how I can delete files from a directory for the current date? (2 Replies)
Discussion started by: tricampeon81
2 Replies
PKEYPARAM(1SSL) 						      OpenSSL							   PKEYPARAM(1SSL)

NAME
openssl-pkeyparam, pkeyparam - public key algorithm parameter processing tool SYNOPSIS
openssl pkeyparam [-help] [-in filename] [-out filename] [-text] [-noout] [-engine id] [-check] DESCRIPTION
The pkeyparam command processes public key algorithm parameters. They can be checked for correctness and their components printed out. OPTIONS
-help Print out a usage message. -in filename This specifies the input filename to read parameters from or standard input if this option is not specified. -out filename This specifies the output filename to write parameters to or standard output if this option is not specified. -text Prints out the parameters in plain text in addition to the encoded version. -noout Do not output the encoded version of the parameters. -engine id Specifying an engine (by its unique id string) will cause pkeyparam to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. -check This option checks the correctness of parameters. EXAMPLE
Print out text version of parameters: openssl pkeyparam -in param.pem -text NOTES
There are no -inform or -outform options for this command because only PEM format is supported because the key type is determined by the PEM headers. SEE ALSO
genpkey(1), rsa(1), pkcs8(1), dsa(1), genrsa(1), gendsa(1) COPYRIGHT
Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. 1.1.1a 2018-12-18 PKEYPARAM(1SSL)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy