I have a file with lines ending with a date in format dd/mm/yyyy see example below:
What I would like to do is delete all lines with a date older than 30 days.
With above example I should be left with a file like below
Your help would be appreciated.
Thanks in advance.
Last edited by Scott; 01-18-2011 at 02:00 PM..
Reason: Code tags
Hi all.
I have a database log file in which log data get appended to it daily. I want to do a automatic maintainence of this log by going through the log and deleting lines belonging to a certain date.
How should i do it? Please help. Thanks.
Example. To delete all lines prior to Jun... (4 Replies)
Hey all, a relative bash/script newbie trying solve a problem.
I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like
2007-11-03... (3 Replies)
i need to delete the lines is match from file data 1 & data 2
please help?
data 1
4825307
4825308
4825248
4825309
4825310
4825311
4825336
data 2
4825248 0100362210 Time4Meal 39.00 41.73 MO & MT MT SMS
4825305 0100367565... (2 Replies)
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Hi
I am using the following command to delete a line from the file by line number:
line_number=14
sed "${line_number}d" inputfilename > newfilename
Is there a way to modify this command to specify the range of lines to be deleted, lets say from line 14 till line 5 ?
I tried using the... (5 Replies)
Dear everyone,
I have a file with 900 lines (there is only numbers in one line, no string),
I only need the lines 2+3n (n=0,1...296), i.e line 2, 5, 8, 11...888.
I tried google but only the results such as how to delete all the odd lines or all the even lines with 'awk' command.
Thanks in... (4 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Hello All !
I need your help on this case,
I have a csv file with this:
ITEM105;ARI FSR;2016-02-01 08:02;243
ITEM101;ARI FSR;2016-02-01 06:02;240
ITEM032;RNO TLE;2016-02-01 11:03;320
ITEM032;RNO TLE;2016-02-02 05:43;320
ITEM032;RNO TLE;2016-02-01 02:03;320
ITEM032;RNO... (2 Replies)
Discussion started by: vadim-bzh
2 Replies
LEARN ABOUT CENTOS
hpisettime
hpisettime(1) OpenHPI hpisettime(1)NAME
hpisettime - This sample openhpi application excercises Event Log clock APIs.
SYNOPSIS
hpisettime [-D nn] [-N host[:port]] [-C <cfgfile>] -d mm/dd/yyyy -t HH:MM:SS [-X] [-h]
hpisettime [--domain=nn] [--host=host[:port]] [--cfgfile=file] --date=mm/dd/yyyy --time=HH:MM:SS [--debug] [--help]
DESCRIPTION
hpisettime sets new date and time for the Event Log clock.
If no domain is selected, hpisettime uses a session with the default domain. The selected domain id must be configured via the
openhpidclient.conf file specified in the environment.
OPTIONS
Help Options:
-h, --help
Show help options
Application Options:
-d mm/dd/yyyy, --date=mm/dd/yyyy
New date
-t 24:12:60, --time=24:12:60
New time of day in 24-hr format
-D nn, --domain=nn
Select domain id nn
-X, --debug
Display debug messages
-N "host[:port]", --host="host[:port]"
Open session to the domain served by the daemon at the specified URL (host:port). This option overrides the OPENHPI_DAEMON_HOST and
OPENHPI_DAEMON_PORT environment variables. If host contains ':' (for example IPv6 address) then enclose it in square brackets. For
example: "[::1]" or "[::1]:4743".
-C "file", --cfgfile="file"
Use passed file as client configuration file. This option overrides the OPENHPICLIENT_CONf environment variable.
SEE ALSO
hpi_shell
hpialarms hpifan hpipower hpitop
hpidomain hpigensimdata hpireset hpitree
hpiel hpiiinv hpisensor hpiwdt
hpievents hpionIBMblade hpithres hpixml
ohdomainlist ohhandler ohparam
AUTHORS
Authors of this man page:
Peter D Phan (pdphan@users.sourceforge.net)
Ulrich Kleber (ulikleber@users.sourceforge.net)
Anton Pak (avpak@users.sourceforge.net)
3.2.1 2011-09-20 hpisettime(1)