Sponsored Content
Top Forums Shell Programming and Scripting date -d compatibility on Solaris Post 302303336 by pavanlimo on Thursday 2nd of April 2009 11:32:38 AM
Old 04-02-2009
Data date -d compatibility on Solaris

Hello there ppl,
I thought my question would qualify to be posted in this forum and in Solaris 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! Smilie

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

9 More Discussions You Might Find Interesting

1. BSD

FreeBSD compatibility with Solaris UFS filesystem?

Hi, I'm new to BSD and would like to create a dual-boot between Solaris Express Community Edition and FreeBSD. I would just like to know if the Solaris UFS file system can be written to by BSD? I know that BSD uses UFS2, but I'm hoping that it is backwards compatible with UFS1 provided that... (0 Replies)
Discussion started by: Johnny SSH
0 Replies

2. Shell Programming and Scripting

Date in Solaris

Hi, I am working on date operations in perl. using following code, I am getting today date as per my required format. my $date1 = `date '+%m/%d/%Y'`; can I find day+1 date. (ie. If today is 12/01/2009 then I want to edit above code t find 12/02/2009) ---------- Post updated... (3 Replies)
Discussion started by: gentleDean
3 Replies

3. Solaris

Clearcase compatibility with Solaris 10

Hi, Is Clearcase version 2002.05.00 is supported and compatible with Solaris10? Cheers, Ankur (1 Reply)
Discussion started by: sharmaankur85
1 Replies

4. Solaris

Solaris 8 vs Solaris 10 compatibility issues !

Hello, I recently upgraded our system from Solaris 8 to 10. It seems couple of binaries crashed in the new server Solaris 10. Before digging too much on it , from theory it sounds like any binary that is built on Solaris 8 (using gmake) is supposed to be compatible with Solaris 10 , right ? ... (1 Reply)
Discussion started by: sudsa
1 Replies

5. Solaris

Solaris 10 - HW compatibility

Sorry, if this isn't the right forum for this question. I would like to compile an executable with gcc/g++ under Solaris 10 on the following OLDER SPARC-machine and then run this executable on the NEW SPARC-machine (see description down in this post). I'm wondering if it would be possible or if... (4 Replies)
Discussion started by: sunfire
4 Replies

6. Hardware

Solaris HW compatibility list

I'm picking HW for my cheap Solaris server and am wondering if there is a decent list of HW compatible with the Solaris OS. The best I could find is this: OTN - Oracle Solaris 11 11/11: Hardware Compatibility List, but it surprises me that only a single motherboard is listed. I am searching... (1 Reply)
Discussion started by: RychnD
1 Replies

7. Solaris

Retina display Macbook Pro and Solaris compatibility

Has anyone attempted to install Solaris 11 on a Macbook Pro with the new Retina display? I'm considering setting up a triple boot scenario with Windows 7, Mac OS X and Solaris 11. My goals are to learn the OS better and to gain daily exposure to it by running it as a desktop OS whenever possible. (11 Replies)
Discussion started by: DustinT
11 Replies

8. Solaris

Solaris 11 compatibility/ucb install

Hi im a newbie to solaris. im given the task to install the compatibility/ucb component my environment is without internet connection. so when i ran the command: pkg install compatibility/ucb i get an error: Unable to contact valid package repository where can i find the download for this... (2 Replies)
Discussion started by: guy3145
2 Replies

9. Solaris

Solaris Date format help please

I have list of dates in a file. Am reading each line and trying to format date, Can you please help me ? Sample file content: 02/22/16 USA is great country 02/21/16 USA future 02/23/16 who is he I want to read each line from above file and format date as below 2016-02-21 (i.e., using... (1 Reply)
Discussion started by: prince1987
1 Replies
suninstall(1M)						  System Administration Commands					    suninstall(1M)

NAME
suninstall - install the Solaris operating system SYNOPSIS
suninstall DESCRIPTION
install-solaris(1M) is now the preferred command for starting and restarting the Solaris Installation program. It should be used instead of suninstall. suninstall is symbolically linked to install-solaris. suninstall is a forms-based and graphical subsystem for installing the operating system. suninstall exists only on the Solaris installation media (CD or DVD) and should only be invoked from there. Refer to the Solaris 10 Instal- lation Guide: Basic Installations for more details. suninstall allows installation of the operating system onto any standalone system. suninstall loads the software available on the installa- tion media. Refer to the Solaris 10 Installation Guide: Basic Installations for disk space requirements. USAGE
Refer to the Solaris 10 Installation Guide: Basic Installations for more information on the various menus and selections. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ SEE ALSO
pkginfo(1), install(1M), install-solaris(1M), pkgadd(1M), attributes(5) Solaris 10 Installation Guide: Basic Installations NOTES
It is advisable to exit suninstall by means of the exit options in the suninstall menus. SunOS 5.10 9 Sep 2004 suninstall(1M)
All times are GMT -4. The time now is 03:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy