Re: shell script to parse html and date comp ?

Jiří Baum <[email protected]>
Newsgroups gmane.org.user-groups.slug.general
Message-ID <[email protected]>
Hi,

> Rick, Jiri,

> many thanks, I'm trying to get this done;

> egrep works good, I was trying to shortcut date comparison thing by
> converting to seconds, BUT, hit a snag as my system is set to:

> #  set | grep LANG
> LANG=en_US.UTF-8

check also the LC_* variables:
    set | grep LC_

> # date --date='20/03/2014'     +"%s"
> date: invalid date `20/03/2014'
> # date --date='03/20/2014'     +"%s"
> 1395234000

> which I think means assumed format is mm dd yy ?

Yes; 1395234000 is 20 Mar 2014.

> where should I change it to en_au ?

LANG=en_AU.UTF-8; export LANG

>> Of course, all of this would be much easier to code in python, perl or
>> ruby.

> I'll look at that next time, thanks

It's probably still worthwhile switching even now — you haven't even
started with the ics/vcal generation and so on...


Jiri
-- 
Jiří Baum <[email protected]>
Sabik Software Solutions Pty Ltd
0413 183 117
http://www.baum.com.au/sabik
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.