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,
Recently I wrote a shell script where I have defined LOG_DATE=$(date +"%d%b") at the start of the script (which should give the date in format '20Oct') and then called this date last on in the script. There is no problem when the script is executed manually ie. when I type... (12 Replies)
Hi,
I know there is a Q/A section and lots of posts regarding date command here. I am sorry to start a new thread. I am very new to shell scripting (actually i am working on my first program), so please forgive my ignorance. I could not find an answer to my problem else where so i posted it... (10 Replies)
Hi All,
can any one help me fix the error in this - i am still a novice in shell programming. I got this code after some googling now the code works with all the dates( as much as i know) except for 08 th and 09th of every month. can any one of you please help me fix this issue?
Thanks in... (11 Replies)
Hi everyone,
I have problem where I need to convert numbers to date format and then figure out what is less than or equal to specific date, the data comes out of a report in the following format
071205
141005
091205
111105
051005
141005
261005
181005
so I need to firstly run through... (15 Replies)
Hi All,
Can anyone tell me a simple way of converting a date in ddmmyyyy format to dd-mmm-yy format.
For example
17022006 to 17-FEB-06
Thanks in advance
Regards,
Gaurav (11 Replies)
I need to get yesterdays date in the format yyyymmdd
I can get today's date simply enough - 20031112
Is there any way to substract 1 from this easily enough in korn shell script?
It has to be korn shell and not perl (20 Replies)
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,
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)
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)
Hi All,
I have a log file where every line contains a date and some other data, i want to grep only the date from every line to a different file.
Please help how to get this.
Thanks in advance !! (25 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)
I have written a code in Linux environment which compares two dates and print "correct" if 1st date is less than 2nd date. But when I'm running the same code in SunOS environment, "date -d is an illegal format" is the error it is throwing. How different should my code be so that it executes well in... (18 Replies)
Hi All,
Could you please provide the shell script to find number of weekdays and
number of weekends for a given date for that month.
Monday to friday should be considered as weekdays and Saturday and Sunday should be considered as weekends.
Date should be passed as parameter.
For... (13 Replies)