DP(8) [nmh-1.5] DP(8)NAME
dp - parse dates 822-style
SYNOPSIS
/usr/lib/mh/dp [-form formatfile] [-format string] [-width columns] [-version] [-help] dates ...
DESCRIPTION
Dp is a program that parses dates according to the ARPA Internet standard. It also understands many non-standard formats, such as those
produced by TOPS-20 sites and some UNIX sites using ctime(3). It is useful for seeing how nmh will interpret a date.
The dp program treats each argument as a single date, and prints the date out in the official 822-format. Hence, it is usually best to
enclose each argument in quotes for the shell.
To override the output format used by dp, the -format string or -format file switches are used. This permits individual fields of the
address to be extracted with ease. The string is simply a format string and the file is simply a format file. See mh-format(5) for the
details.
Here is the default format string used by dp:
%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
which says that if an error was detected, print the error, a `:', and the date in error. Otherwise, output the 822-proper format of the
date.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
None
SEE ALSO ap(8), Standard for the Format of ARPA Internet Text Messages (RFC-822)
DEFAULTS
`-format' default as described above
`-width' default to the width of the terminal
CONTEXT
None
BUGS
The argument to the -format switch must be interpreted as a single token by the shell that invokes dp. Therefore, one must usually place
the argument to this switch inside quotes.
MH.6.8 11 June 2012 DP(8)
Check Out this Related Man Page
DP(8) [nmh-1.5] DP(8)NAME
dp - parse dates 822-style
SYNOPSIS
/usr/lib/mh/dp [-form formatfile] [-format string] [-width columns] [-version] [-help] dates ...
DESCRIPTION
Dp is a program that parses dates according to the ARPA Internet standard. It also understands many non-standard formats, such as those
produced by TOPS-20 sites and some UNIX sites using ctime(3). It is useful for seeing how nmh will interpret a date.
The dp program treats each argument as a single date, and prints the date out in the official 822-format. Hence, it is usually best to
enclose each argument in quotes for the shell.
To override the output format used by dp, the -format string or -format file switches are used. This permits individual fields of the
address to be extracted with ease. The string is simply a format string and the file is simply a format file. See mh-format(5) for the
details.
Here is the default format string used by dp:
%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>
which says that if an error was detected, print the error, a `:', and the date in error. Otherwise, output the 822-proper format of the
date.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
None
SEE ALSO ap(8), Standard for the Format of ARPA Internet Text Messages (RFC-822)
DEFAULTS
`-format' default as described above
`-width' default to the width of the terminal
CONTEXT
None
BUGS
The argument to the -format switch must be interpreted as a single token by the shell that invokes dp. Therefore, one must usually place
the argument to this switch inside quotes.
MH.6.8 11 June 2012 DP(8)
Hi All,
I have a requirement to display all the dates within the provided (through user input) date range.
For eg: If I enter 28012009 (as From date in the format 'DDMMYYYY') and 02022009(as To date in the format 'DDMMYYYY'), the output should be all dates occuring between the from and to... (11 Replies)
hi friends :D ,
I am finding a small difficulty to compare two date & echo comparision results.
The dates are in format 2005/05/31 (yyyy/mm/dd). can we do it using awk command ? How. Although i searched the forum for the key word "compare date" but i could not get the desired so i am posting it.... (7 Replies)
Hi guys,
I have a text file with lots of lines like this:
MCOGT23R27815 27/07/07 27/05/09
SO733AM0235 30/11/07 30/11/10
NL123403N 04/03/08 04/03/11
0747AM7474 04/04/08 04/04/11
I want to change each line so the date format looks like this:
MCOGT23R27815 07/07/27 09/05/27 ... (7 Replies)
Hi All,
I am trying to generate quarter dates with user giving input as begin date and end date. Example: Input by user:
begin_date = "2009-01-01"
end_date = 2010-04-30"
required output:
2009-01-01 2009-03-31 09Q01
2009-04-01 2009-06-30 09Q02
.
.
till
2010-01-01 2010-03-31 10Q01
... (9 Replies)
Hi,
I am using awk to get particular dates in seconds and the output am getting is like 1.28071e+09.
How can I convert it to number format.
Can anyone help me out?
Thanks in advance..! (7 Replies)
Hi,
I have a fixed width text file without any header row. One of the columns contains a date in YYYYMMDD format.
If the original file contains 3 dates, I want my shell script to split the file into 3 small files with data for each date.
I am a newbie and need help doing this. (14 Replies)
hi all, im having problems. I need to change all number 10 in a text file to word form, or in short from 10->ten. the thing is number 10 including in dates such as 10/22/1997 or 03-10-2011 should not be changed. im having some trouble because the file contains numbers like "price range from... (11 Replies)
I need a script to search for *.LOG in a directory, output the line after the current date and yesterday's date and also output the next 5 lines after the current date and yesterday's date
I have tried following commands, still no result
Currentdate=`date -u +"%m/%d/%y"`
awk... (10 Replies)
hi friends,
I m trying to write a script which compares to dates.
for this i am converting dates into no using synatx
as below
v2=`date | awk '{print $2,$3,$4}'`
v3=`date +%s -d "$v2"`
this syntax is working in bash shell ,but fails in ksh shell.
please suggest on this. (12 Replies)
Hello,
I have a file name in the below format and have to append the date as _$currdate.
kchik_UK_lo.txt_$currdate.
The above should be the format and I dont want to put entire filename as above in the code, but it should give me the output as the above filename.Can anyone please help... (7 Replies)
Hallo Team,
I have a simple request and i would appreciate your help.
I would like to use two dates in my script lets:
A=$(date +"%d %B %Y")
echo $A
23 June 2014
That's awesome now we cooking. Now i want B to be on the previous month
eg: echo $B Should give me
23 May 2014
I would... (9 Replies)
Hi Team,
I need to connect to a prod server and need to get the files which falls between two dates. I should not create ant files on that machine.
I am using korn shell.
Your help is very much appreciated.
Vinay (13 Replies)
Hello all, I am working on a file like below:
site Date time value1 value2
0023 2014-01-01 00:00 32.0 23.7
0023 2014-01-01 01:00 38.0 29.9
0023 2014-01-01 02:00 85.0 26.6
0023 2014-01-01 03:00 34.0 25.3
0023 2014-01-01 04:00 37.0 23.8
0023 2014-01-01 05:00 80.0 20.3
0023 2014-01-01 06:00... (16 Replies)
Hi Experts,
I have written the below script to check the missing files based on the date in the file name from current date to in a given interval of days.
In the file names we have dates along with some name. ex:jera_sit_2017-04-25-150325.txt.
The below script is working fine if we have only... (10 Replies)
I am having below script which needs to be executed based on start and end date
#!/bin/bash
array=('2016-09-27' '2016-10-27' '2016-11-27' '2016-12-27' '2017-01-27' '2017-02-27' '2017-03-27' '2017-04-27' '2017-05-27' '2017-06-27' '2017-07-27' '2017-08-27' '2017-09-27' )
for i in "${array}"
do... (9 Replies)