Sponsored Content
Full Discussion: Decimal places
Top Forums Shell Programming and Scripting Decimal places Post 302516759 by kurumi on Monday 25th of April 2011 03:09:00 AM
Old 04-25-2011
Code:
$ ruby -e 'BEGIN{print 236 * 1.00}'

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

trimm up the decimal places in output

I have a perl script that reports the avg time of a application call and the total number of calls. This works fine, however I would like to trim the number of decimal places reported from 12 to like 3 and I don't know how. Any suggestions? Here is what I use to get the avg time... for $eRef (... (2 Replies)
Discussion started by: theninja
2 Replies

2. Shell Programming and Scripting

Using the "Less Than" (-lt) switch on numbers with decimal places?

I'm using shell scripts to run some commands for the Configuration Management tool called Telelogic Synergy. I need to get the script to compare version numbers of files. The version numbers of the files are part of the actual filename, such as the following example: example_file-1... (7 Replies)
Discussion started by: Glyn_Mo
7 Replies

3. Shell Programming and Scripting

Four decimal places with awk

i have a script in which awk prints "($2-1700)/10000" and the answer is -0.07,but i want the answer in 4 decimal places. that is -0.0700. How can i sue awk to get my results in four decimal places (4 Replies)
Discussion started by: tomjones
4 Replies

4. Shell Programming and Scripting

Arithmetic but keep 2 decimal places

I am trying to perform arithmetric, for example, to increment the value of variable $a (say 3) by 0.05 but when I tried the following expression let a=a+0.05 or a=$((a+0.05)) both returned 3.0499999999999998 I want to keep 2 decimal places so it returns 3.05 instead. (6 Replies)
Discussion started by: piynik
6 Replies

5. Shell Programming and Scripting

Bash Rounding to 2 decimal places

I have a number in a bash variable n, and want to round it to 2 decimal places. How can I do that? n=0.0867268 Need to have num=0.09 (1 Reply)
Discussion started by: kristinu
1 Replies

6. Shell Programming and Scripting

How to round up value upto 2 decimal places using sed?

Please help me in rounding up value upto 2 decimal palces using sed command #!/usr/bin/bash a=15.42 b=13.33 c=`echo $a*$b |bc -l` echo $c above code is is giving output "205.5486" but i want the output as "205.55" Thank you... (15 Replies)
Discussion started by: ranabhavish
15 Replies

7. Shell Programming and Scripting

Printing with decimal places from last 4 digits

I have input file like below, 201424|9999|OSS|622010|RGT|00378228764 201424|8888|OM|587079|RGT|00284329675 201424|7777|OM|587076|RGT|00128671024 201424|6666|OM|581528|RGT|00113552084 Output should be like below, should add decimal (.) from last 4 digits. ... (2 Replies)
Discussion started by: vinothsekark
2 Replies

8. Shell Programming and Scripting

Sum the fields with 6 decimal places - getting only 2 decimal places as output

I used the below script to Sum up a field in a file based on some unique values. But the problem is when it is summing up the units, it is truncating to 2 decimals and not 6 decimals as in the input file (Input file has the units with up to 6 Decimals – Sample data below, when the units in the 2... (4 Replies)
Discussion started by: brlsubbu
4 Replies

9. Shell Programming and Scripting

Calculate the constant e to 14+ decimal places using integer maths.

Hi guys... I am loving this integer maths thing. 64 bit systems are certainly easier than 32 bit, but hey, I don't intend to leave out my fav' platform. Using one of the 'Brothers' methods, URL inside the code. #!/bin/sh # # #!/usr/local/bin/dash # e_constant.sh # Brother's formula . #... (2 Replies)
Discussion started by: wisecracker
2 Replies
iconv_852(5)						Standards, Environments, and Macros					      iconv_852(5)

NAME
iconv_852 - code set conversion tables for MS 852 (MS-DOS Latin 2) DESCRIPTION
The following code set conversions are supported: +--------------------------------------------------------------------+ | Code Set Conversions Supported | +--------------+--------+--------------+--------+--------------------+ | Code |Symbol |Target Code |Symbol | Target Output | +--------------+--------+--------------+--------+--------------------+ |MS 852 |dos2 |ISO 8859-2 |iso2 | ISO Latin 2 | +--------------+--------+--------------+--------+--------------------+ |MS 852 |dos2 |MS 1250 |win2 | Windows Latin 2 | +--------------+--------+--------------+--------+--------------------+ |MS 852 |dos2 |Mazovia |maz | Mazovia | +--------------+--------+--------------+--------+--------------------+ |MS 852 |dos2 |DHN |dhn | Dom Handlowy Nauki | +--------------+--------+--------------+--------+--------------------+ CONVERSIONS
The conversions are performed according to the following tables. All values in the tables are given in octal. MS 852 to ISO 8859-2 For the conversion of MS 852 to ISO 8859-2, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 852 | ISO 8859-2 | MS 852 | ISO 8859-2 | |24-177 | 40 |271-274 |40 | |200 | 307 |275 |257 | |201 | 374 |276 |277 | |202 | 351 |277-305 |40 | |203 | 342 |306 |303 | |204 | 344 |307 |343 | |205 | 371 |310-316 |40 | |206 | 346 |317 |244 | |207 | 347 |320 |360 | |210 | 263 |321 |320 | |211 | 353 |322 |317 | |212 | 325 |323 |313 | |213 | 365 |324 |357 | |214 | 356 |325 |322 | |215 | 254 |326 |315 | |216 | 304 |327 |316 | |217 | 306 |330 |354 | |220 | 311 |331-334 |40 | |221 | 305 |335 |336 | |222 | 345 |336 |331 | |223 | 364 |337 |40 | |224 | 366 |340 |323 | |225 | 245 |341 |337 | |226 | 265 |342 |324 | |227 | 246 |343 |321 | |230 | 266 |344 |361 | |231 | 326 |345 |362 | |232 | 334 |346 |251 | |233 | 253 |347 |271 | |234 | 273 |350 |300 | |235 | 243 |351 |332 | |236 | 327 |352 |340 | |237 | 350 |353 |333 | |240 | 341 |354 |375 | |241 | 355 |355 |335 | |242 | 363 |356 |376 | |243 | 372 |357 |264 | |244 | 241 |360 |255 | |245 | 261 |361 |275 | |246 | 256 |362 |262 | |247 | 276 |363 |267 | |250 | 312 |364 |242 | |251 | 352 |365 |247 | |252 | 40 |366 |367 | |253 | 274 |367 |270 | |254 | 310 |370 |260 | |255 | 272 |371 |250 | |256-264 | 40 |372 |377 | |265 | 301 |374 |330 | |266 | 302 |375 |370 | |267 | 314 |376 |40 | |270 | 252 | | | +---------------+----------------+----------------+---------------+ MS 852 to MS 1250 For the conversion of MS 852 to MS 1250, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 852 | MS 1250 | MS 852 | MS 1250 | |200 | 307 |270 |252 | |201 | 374 |271-274 |40 | |202 | 351 |275 |257 | |203 | 342 |276 |277 | |204 | 344 |277-305 |40 | |205 | 371 |306 |303 | |206 | 346 |307 |343 | |207 | 347 |310-316 |40 | |210 | 263 |317 |244 | |211 | 353 |320 |360 | |212 | 325 |321 |320 | |213 | 365 |322 |317 | |214 | 356 |323 |313 | |215 | 217 |324 |357 | |216 | 304 |325 |322 | |217 | 306 |326 |315 | |220 | 311 |327 |316 | |221 | 305 |330 |354 | |222 | 345 |331-334 |40 | |223 | 364 |335 |336 | |224 | 366 |336 |331 | |225 | 274 |337 |40 | |226 | 276 |340 |323 | |227 | 214 |341 |337 | |230 | 234 |342 |324 | |231 | 326 |343 |321 | |232 | 334 |344 |361 | |233 | 215 |345 |362 | |234 | 235 |346 |212 | |235 | 243 |347 |232 | |236 | 327 |350 |300 | |237 | 350 |351 |332 | |240 | 341 |352 |340 | |241 | 355 |353 |333 | |242 | 363 |354 |375 | |243 | 372 |355 |335 | |244 | 245 |356 |376 | |245 | 271 |357 |264 | |246 | 216 |360 |255 | |247 | 236 |361 |275 | |250 | 312 |362 |262 | |251 | 352 |363 |241 | |252 | 254 |364 |242 | |253 | 237 |365 |247 | |254 | 310 |366 |367 | |255 | 272 |367 |270 | |256 | 253 |370 |260 | |257 | 273 |371 |250 | |260-264 | 40 |372 |377 | |265 | 301 |374 |330 | |266 | 302 |375 |370 | |267 | 314 |376 |40 | +---------------+----------------+----------------+---------------+ MS 852 to Mazovia For the conversion of MS 852 to Mazovia, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 852 | Mazovia | MS 852 | Mazovia | |205 | 40 |246-247 |40 | |206 | 215 |250 |220 | |210 | 222 |251 |221 | |212-213 | 40 |253 |246 | |215 | 240 |254-270 |40 | |217 | 225 |275 |241 | |220-226 | 40 |276 |247 | |227 | 230 |306-336 |40 | |230 | 236 |340 |243 | |233-234 | 40 |342 |40 | |235 | 234 |343 |245 | |236-243 | 40 |344 |244 | |244 | 217 |345-375 |40 | |245 | 206 | | | +---------------+----------------+----------------+---------------+ MS 852 to DHN For the conversion of MS 852 to DHN, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 852 | DHN | MS 852 | DHN | |200-205 | 40 |244 |200 | |206 | 212 |245 |211 | |207 | 40 |246-247 |40 | |210 | 214 |250 |202 | |211-214 | 40 |251 |213 | |215 | 207 |253 |220 | |216 | 40 |254-270 |40 | |217 | 201 |275 |210 | |220-226 | 40 |276 |221 | |227 | 206 |306-336 |40 | |230 | 217 |340 |205 | |233-234 | 40 |342 |40 | |235 | 203 |343 |204 | |236-237 | 40 |344 |215 | |242 | 216 |345-375 |40 | |252 | 254 | | | +---------------+----------------+----------------+---------------+ FILES
/usr/lib/iconv/*.so conversion modules /usr/lib/iconv/*.t conversion tables /usr/lib/iconv/iconv_data list of conversions supported by conversion tables SEE ALSO
iconv(1), iconv(3C), iconv(5) SunOS 5.10 18 Apr 1997 iconv_852(5)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy