05-07-2006
I am a new user here.. do not know how that thumbs down symbol got attached in the prev. reply. dont mean disrespect none to nobody
also I noticed that i did not give right example.
123.4567
000.0098
should be 123.46(1).
error determine at which place the rounding should occur in the mean/main value(1st col). this case is little non-trivial as error itself is rounded off to nearer value. We look for only one (significant) digit from error, that rounds 0.0098 as 0.01. Now in the mean value (123.4567) its useless to go with precision better than 0.01. so we would round off the value upto two digits after decimal. that makes it 123.46.
Last edited by ahan; 05-07-2006 at 10:04 PM..
Reason: incomplete.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent.
E.g : username empid
------------------------
sri 123
to
username,empid
sri,123
Thanks,
Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies
2. Shell Programming and Scripting
Hi All,
I have the following file that has computer data for various pcs in my network...
Snap of the file is as follows
*******************************************************************************
Serial
123456
Computer IP Address
lo0:... (1 Reply)
Discussion started by: aavam
1 Replies
3. Shell Programming and Scripting
please help me writing a awk script
001_r.pdb 0.0265185
001_r.pdb 0.0437049
001_r.pdb 0.0240642
001_r.pdb 0.0310264
001_r.pdb 0.0200482
001_r.pdb 0.0146746
001_r.pdb 0.0351344
001_r.pdb 0.0347856
001_r.pdb 0.036119
001_r.pdb 1.49
002_r.pdb 0.0281011
002_r.pdb 0.0319908
002_r.pdb... (5 Replies)
Discussion started by: phoenix_nebula
5 Replies
4. Shell Programming and Scripting
Input
217:fngadi4osa:fngadi4osa:M 217:415744:N/A
227:fngadi4osa:fngadi4osa: M 227:51200:N/A
228:fngadi4osa:fngadi4osa: M 228:102400:N/A
65:sapgt04:sapgt04: M 65:104448:N/A
228:fngadi4osa:fngadi4oma: M 228:102400:N/A
Output
217:fngadi4osa:fngadi4osa:M 217:415744:N/A... (3 Replies)
Discussion started by: greycells
3 Replies
5. Shell Programming and Scripting
Good morning,
I am still learning the powers of awk and perl. I am in need of a bit of help.
I have a script on one of my launch systems...if that is even the word for it. Basically you can only ssh to a system if you are connected to this system due to firewalls.
So from that system, I... (2 Replies)
Discussion started by: brianjb
2 Replies
6. Shell Programming and Scripting
Experts Good day,
I have the following data, file1
BRAAGRP1
A2X
B2X
C2X
D2X
BRBGRP12
A3X
B3X
Z10
D09
BRC1GRP2
LO01 (4 Replies)
Discussion started by: rveri
4 Replies
7. UNIX for Dummies Questions & Answers
Greetings!
I need a quick way to change the format in a table of data
Here is an example of the input:
10 72 Value=177 VDB=0.0245 Value4=0,0,171,0
10 274 Value=238 VDB=0.0433 Value4=29,0,205,0
10 312 Value=222 VDB=0.0384 Value4=8,0,190,19
10 540 Value=405 VDB=0.0391 Value4=13,30,153,195... (3 Replies)
Discussion started by: Twinklefingers
3 Replies
8. Shell Programming and Scripting
Dear Friends,
I am in urgent need for awk/sed/sh script for converting a specific data format (.txt) to .xls.
The input is as follows:
>gi|1234|ref|
Query = 1 - 65, Target = 1677 - 1733
Score = 8.38, E = 0.6529, P = 0.0001513, GC = 46
fd sdfsdfsdfsdf
fsdfdsfdfdfdfdfdf... (6 Replies)
Discussion started by: Amit1
6 Replies
9. Shell Programming and Scripting
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
10. Shell Programming and Scripting
/clusters/cluster-1/exports/storage-views/M1_CRE03_SV:
Name Value
------------------------ ---------------------------------------------------------------------------------------------------
caw-enabled true
controller-tag -
initiators ... (7 Replies)
Discussion started by: greycells
7 Replies
LEARN ABOUT PHP
msgfmt_format_message
MSGFMT_FORMAT_MESSAGE(3) 1 MSGFMT_FORMAT_MESSAGE(3)
MessageFormatter::formatMessage - Quick format message
Object oriented style
SYNOPSIS
publicstatic string MessageFormatter::formatMessage (string $locale, string $pattern, array $args)
DESCRIPTION
Procedural style
string msgfmt_format_message (string $locale, string $pattern, array $args)
Quick formatting function that formats the string without having to explicitly create the formatter object. Use this function when the
format operation is done only once and does not need and parameters or state to be kept.
PARAMETERS
o $locale
- The locale to use for formatting locale-dependent parts
o $pattern
- The pattern string to insert things into. The pattern uses an 'apostrophe-friendly' syntax; it is run through umsg_autoQuoteA-
postrophe before being interpreted.
o $args
- The array of values to insert into the format string
RETURN VALUES
The formatted pattern string or FALSE if an error occurred
EXAMPLES
Example #1
msgfmt_format_message(3) example
<?php
echo msgfmt_format_message("en_US", "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree
", array(4560, 123, 4560/123));
echo msgfmt_format_message("de", "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum
", array(4560, 123, 4560/123));
?>
Example #2
OO example
<?php
echo MessageFormatter::formatMessage("en_US", "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree
", array(4560, 123, 4560/123));
echo MessageFormatter::formatMessage("de", "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum
", array(4560, 123, 4560/123));
?>
The above example will output:
4,560 monkeys on 123 trees make 37.073 monkeys per tree
4.560 Affen auf 123 Baumen sind 37,073 Affen pro Baum
SEE ALSO
msgfmt_create(3), msgfmt_parse(3), msgfmt_get_error_code(3), msgfmt_get_error_message(3).
PHP Documentation Group MSGFMT_FORMAT_MESSAGE(3)