The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

View Poll Results: Bc Or Xcal
Bc 3 60.00%
Xcal 2 40.00%
Voters: 5. You may not vote on this poll

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 06-26-2005
thepicoman thepicoman is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 14
BC Or Xcal

Wich one is better [COLOR=Cyan]
  #2 (permalink)  
Old 06-30-2005
zylwyz's Avatar
zylwyz zylwyz is offline
Registered User
  
 

Join Date: Jun 2005
Location: I'm living in Unix :)
Posts: 53
Thumbs up

Xcal is the best
  #3 (permalink)  
Old 06-30-2005
r2007's Avatar
r2007 r2007 is offline
Registered User
  
 

Join Date: Jun 2005
Location: China
Posts: 73
how about dc?
  #4 (permalink)  
Old 07-05-2005
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,628
I vote for bc (or dc, or what else), because it is standard UNIX, unlike Xcal AND it is easy to script. Here is a rounding function in ksh, try scripting it with xcal instead of bc, here is just the core of it:

Code:
                                                 # calculate rounded value
nValue=$( print "scale=$iDigits; $( print "scale=$iDigit2; $nValue + $nAdd" |\
                                    bc \
                                  ) / 1" | \
          bc \
        )
bakunin
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 06:03 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