The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Get date from cal function ukatru UNIX for Advanced & Expert Users 3 09-04-2008 06:54 AM
Friendz.. plz help me on this date function. psn123 UNIX for Advanced & Expert Users 14 07-23-2008 05:09 PM
Date Function charandevu Shell Programming and Scripting 1 04-02-2008 10:12 AM
Date Function charandevu Shell Programming and Scripting 1 04-02-2008 08:44 AM
date function abey Shell Programming and Scripting 2 02-27-2006 05:28 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-11-2008
c00kie88 c00kie88 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 63
o/s : sun solaris
I try to perform the calculation within script

Do i need to use expr expression to perform the division ?
  #2 (permalink)  
Old 10-11-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,342
Why don't you use the datecalc script of Perderabo? Copy and paste the script in your directory, make it executable and call it in your script as follow:


Code:
datediff=`./datecalc -a 2007 1 1 - 1970 1 1`
echo "$datediff"

Regards


  #3 (permalink)  
Old 10-11-2008
c00kie88 c00kie88 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 63
it'sbecasue i have syntax problem

some of the command swith can;t run on sun solaris
  #4 (permalink)  
Old 10-11-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
I use it on Solaris all the time.
  #5 (permalink)  
Old 10-11-2008
c00kie88 c00kie88 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 63
ok..

oopss.. sorry

it works now

i missing out couple of stuff when i did copy and paste

it's ok now

thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0