date -d nightmare on Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris date -d nightmare on Solaris
# 1  
Old 04-02-2009
Power date -d nightmare on Solaris

Hello there ppl,
I thought my question would qualify to be posted in this forum and in Shell scripting forum.

And I swear to God.. there is no discussion on this exact topic anywhere else on the web!

So my script on BASH uses 2 commands:

1) date -d "Fri Mar 06 10:18:16 UTC 2009" +%s

This command converts the specified time into localtime(with local timezone) and then into epoch(number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970).

2) date -d "last Sunday" +%s

This command gives the time in epoch of the immediately previous Sunday.

Now I'm clueless about how to make my script compatible with Solaris.
Some pointers I found through google, not much of a help :|.
They suggested me to use

perl -e "print time;"

This prints only the current epoch time, doesn't take 'time' as input, let alone "last Sunday" as input.

So.. guys who would help solve these 2 cases will win a free lifetime holiday to mars!
Really!

No, seriously, I would appreciate any help, whatsoever.

Last edited by pavanlimo; 04-02-2009 at 12:34 PM..
# 2  
Old 04-02-2009
Double posting is not allowed by the forum rules.
Thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

AI server corporate nightmare

Hello Ex-Sun fellows, i've been tasked to install a bran spanking new AI Solaris 11.1 server for our Oracle park. With the documentation this is what's running and what's working. T5120 2 oracle VM's (one ldom on each disk) One with a Solaris 11.1 repo, AI server. One for testing... (0 Replies)
Discussion started by: maverick72
0 Replies

2. UNIX for Advanced & Expert Users

Virtualizing SCO v5 - interesting project/nightmare, could use some help

same old story, we have an important very old app running on SCO 5, box is only on LAN and as such was never updated by anyone etc.. box is nearing its end of life in a bad way (currently experiencing some SCSI issues) and it's time to do something when good advice of "lets upgrade" for years was... (1 Reply)
Discussion started by: mc18
1 Replies

3. Shell Programming and Scripting

ftp nightmare

Hi everyone I have a Fedora FTP server (lets call it FTP-SERVER1) and files are constantly being uploaded to it from a 3rd party. Once every 15 minutes I need to "move" the files from the FTP server to another server (lets call it SVR-WINDOWS) where it will be processed and then deleted. ... (3 Replies)
Discussion started by: soliberus
3 Replies

4. BSD

FreeBSD nightmare!!!

Dear friends out there, i hope u'll have enough time to read this problem of mine and try to help me solve it. well, i've been a long time user of microsoft products and happened to come across FreeBSD when one fellow referred me to it saying that it was a wonderful OS which one could use for web... (6 Replies)
Discussion started by: kenyatta
6 Replies

5. UNIX for Dummies Questions & Answers

is unix really such a nightmare... or is it me?

i rue the day that my server manager and i parted company... the start of a long journey.... :( sometimes i find myself daydreaming about the days when i could say... "this dont work, can u fix it?".... and 2 mins later it worked! i have a new way of "cursing" at ppls.... i just say "failed... (10 Replies)
Discussion started by: mickeymouse
10 Replies

6. UNIX for Dummies Questions & Answers

installing apache (nightmare for me)

Please help... i'm new to this job and new to unix as well..... i'm trying to install apache 2.2.6 it's installed on one server... i need to install it on another server... my clue was to maybe use the fetch command... please help.....for example..... apache is on 69.50.132.14.... and it needs to... (1 Reply)
Discussion started by: marinob007
1 Replies

7. Shell Programming and Scripting

Splitting Chunked-FullNames Nightmare

I've got a problem i'm hoping other more experienced programmers have had to deal with sometime in their careers and can help me: how to get fullnames that were chunked together into one field in an old database into separate more meaningful fields. I'd like to get the records that nicely fit... (2 Replies)
Discussion started by: RacerX
2 Replies

8. HP-UX

Viewcvs...a nightmare on HP-UX!!!

Hello I'm new on this forum but I have a big problem. I've installed Subversion 1.1.1 and Apache 2.0.52 on a HP-UX. This is the uname: HP-UX xxxx B.11.11 U 9000/800 4169945236 unlimited-user license Now I must to install a software to browse the svn repositories. My choice is Viewcvs. ... (3 Replies)
Discussion started by: goblin79
3 Replies
Login or Register to Ask a Question

Featured Tech Videos