Hi,
I have a date field in my input file.
I just want to check if its in the format "DD-MM-YYYY".
Is there any command which can achieve this?
Thanks and Regards,
Abhishek (2 Replies)
I am very new to Perl. I am struggling so hard to search a date (such as 10/09/2009, 10-09-2009) from a text file and replace with a string (say DATE) using Perl. Please help me out. Thanks in advance.
Regds
Doren (4 Replies)
how to check input date format.
for example $input_date must be in format dd.mm.gg
script is execute like this:
bin/script1.sh 14.12.2009
script1.sh code:
#!/bin/sh
input_date=$1
CMD="/app/si/test/test.sh $input_date"
echo "*****"
$CMD (2 Replies)
Hi All,
I am learning PERL for one of the projects, and in one of these scripts, I read a flat text file and print in the terminal.
The problem is, the text file has a date field. The format is yyyymmdd. I need to display this as dd-mon-yyyy.
Any ideas to do this? Thanks a lot for the... (9 Replies)
My source file having one date column. The formate of the date column is yyyymm. I need to validate whether all the rows are in same format in the given file. If it is not I have captured that records in a separate file. I am very new to Unix. I don't how to achieve this. Plz help me to achieve... (2 Replies)
I have a filename,
This can be any of any format,
I want to check if the filename has hours,mins and seconds part. If it is present, i want to replace it with a " * " (star symbol)
output needed:
IMP: The time part can be in any pattern.
How can this be done?:confused:... (3 Replies)
hi there
I have file names in different format as below
triss_20111117_fxcb.csv
triss_fxcb_20111117.csv
xpnl_hypo_reu_miplvdone_11172011.csv
xpnl_hypo_reu_miplvdone_11-17-2011.csv
xpnl_hypo_reu_miplvdone_20111117.csv
xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012
all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013
suppose the date format is stored... (1 Reply)
Hello All,
I have a requirement where i need to get the EXTRACT_DATE from a file and check if the date is of valid format or not and then mail it if it is not valid. Appreciate if you can help me with this.
I did the following so far.
awk '{for(i=1;i++<=NF;)if($i~/^EXTRACT_DATE/) print $i}'... (11 Replies)
Discussion started by: Ariean
11 Replies
LEARN ABOUT DEBIAN
lbdb-fetchaddr
LBDB-FETCHADDR(1) User Manuals LBDB-FETCHADDR(1)NAME
lbdb-fetchaddr - grab addresses from mails add append them to lbdb database
SYNOPSIS
lbdb-fetchaddr [-d dateformat] [-x headerfieldlist] [-c charset] [-a]
lbdb-fetchaddr [-v|-h]
DESCRIPTION
lbdb-fetchaddr is a shell script which reads a mail on stdin. It extracts the contents of some header fields (default: `From:', `To:',
`Cc:', `Resent-From:', and `Resent-To:') from the mail header (only addresses with a real name) and appends them to
$HOME/.lbdb/m_inmail.list. For performance issues lbdb-fetchaddr appends new addresses to this file without removing duplicates. To get
rid of duplicates, the program lbdb-munge exists, which is run by m_inmail if needed and removes duplicates.
To use this program, put the following lines into your $HOME/.procmailrc:
:0hc
| lbdb-fetchaddr
lbdb-fetchaddr writes the actual date to the third column of the database by using strftime(3). It uses "%Y-%m-%d %H:%M" as the default
date format (e.g. "1999-04-29 14:33"). You can change this by using the -d option to select a different date format string as parameter of
lbdb-fetchaddr command like
:0hc
| lbdb-fetchaddr -d "%y-%m-%d"
which results in e.g. "99-04-29".
OPTIONS -v Print version number of lbdb-fetchaddr.
-h Print short help of lbdb-fetchaddr.
-d dateformat
Use the given date format using strftime(3) syntax.
-x headerfields
A colon separated list of header fields, which should be searched for mail addresses. If this option isn't given, we fall back to
`from:to:cc:resent-from:resent-to'.
-c charset
The charset which will be used to write the database. This should be the charset which the application expects (normally the one
from your current locale). If this option isn't given, we fall back to `iso-8859-15'.
-a Also grab addresses without a real name. Use the local part of the mail address as real name.
FILES
$HOME/.lbdb/m_inmail.list
/usr/lib/lbdb/fetchaddr
/usr/lib/lbdb/m_inmail
SEE ALSO lbdbq(1), lbdb_dotlock(1), procmail(1), procmailrc(5), strftime(3).
CREDITS
Most of the really interesting code of this program (namely, the RFC 822 address parser used by lbdb-fetchaddr) was stolen from Michael
Elkins' mutt mail user agent. Additional credits go to Brandon Long for putting the query functionality into mutt.
AUTHOR
The lbdb package was written by Thomas Roessler <roessler@guug.de> and is now maintained and extended by Roland Rosenfeld <roland@spin-
naker.de>.
Unix October 2005 LBDB-FETCHADDR(1)