![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Absolute value | placroix1 | Shell Programming and Scripting | 5 | 12-04-2007 07:26 AM |
| absolute path | Kirichiko | UNIX for Dummies Questions & Answers | 2 | 10-03-2007 06:30 AM |
| absolute path | filedeliver | High Level Programming | 4 | 06-05-2007 05:18 PM |
| Getting absolute value ksh | icyhot | UNIX for Dummies Questions & Answers | 3 | 03-30-2006 06:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
Rounding floating point numbers?
Try Perl function "sprintf".
I'd say #!/usr/bin/perl -w # This will round the value of Y to two decimal points, using ".2f" $Y=14.875; $roundedY= sprintf "%.2f", $Y; print "$roundedY \n"; exit; For more details look at sprintf - formatted print into a string The same is in C and Korn in the man pages. I hope this helps. Good luck |
|
||||
|
bytes = int(bytes/1024)
is there any funcion similar to int for abs in ksh |
| Sponsored Links | ||
|
|