Wake up sleepy-head, someone around you is thinking their way into the future....
« OTRS -> Bugzilla ?Whats the Redhat[tm] name doing on Oracle's site »

generating date range on the shell

Permalink 23/Nov/2006 01:01 , Categories: Software

Trying to generate a date range on the shell ? try something like this :


#!/bin/bash
for f in `seq -f"%f" 1153699200 86400 1164067200 `
do
date -d "`python -c \"import time; print time.ctime(${f})\"`" +%Y%m%d
done

--
Karanbir Singh { http://www.karan.org/ }

Leave a comment »

Feedback awaiting moderation

This post has 1 feedback awaiting moderation...

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Welcome to my Blog. Various bits of rambling and going-on's find their way here. If you have something to say, I would love to hear it from you.

Search

XML Feeds

powered by b2evolution free blog software

Contact | Blog theme by Asevo