11-24-2015
Are there clashing values? Is ";" the field separator ?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
whitout using awk / sad and so on? (3 Replies)
Discussion started by: umen
3 Replies
2. Shell Programming and Scripting
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies
3. AIX
Hello.
Could you please help to know the command to merge multiple text files into one?
I am thinking to use:
cat f1.txt f2.txt f3.txt > f4.txt
Is it okay to use cat command for same purpose - Or could there be any disadvantage in using it?
Thank you (4 Replies)
Discussion started by: panchpan
4 Replies
4. Shell Programming and Scripting
Hello,
I have several files that begin with db. in my directory and I would like to first take it from a specific word starting from $TTL until the end of the contents then do the same all the way down the directory then merge them into one txt file.
Is this possible? I am using cygwin with... (4 Replies)
Discussion started by: richsark
4 Replies
5. Shell Programming and Scripting
I have two text files.
text file 1:
ID filePath col1 col2 col3
1 10584588.mol 269.126 190.958 23.237
2 10584549.mol 281.001 200.889 27.7414
3 10584511.mol 408.824 158.316 29.8561
4 10584499.mol 245.632 153.241 25.2815
5 10584459.mol ... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to merge all the text files into one file using below snippet
cat /home/Temp/Test/Log/*.txt >> all.txt
But it seems it is not working.
I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt
I want to merge each file into one single file and... (6 Replies)
Discussion started by: sharsour
6 Replies
7. Shell Programming and Scripting
Hello expert friends,
I'm writing a script to capture stats using sar and stuck up at report generation.
I have around 10 files in a directory and need to merge them all vertically based on the time value of first column (output file should have only one time value) and insert comma after... (6 Replies)
Discussion started by: prvnrk
6 Replies
8. Shell Programming and Scripting
I have 42 text files; each containing up to 34 lines with following structure;
file1
H-01 23
H-03 5
H-05 9
H-02 14
.
.
file2
H-01 17
H-02 43
H-04 7
H-05 8
H-03 7
.
.
file3 (6 Replies)
Discussion started by: Syeda Sumayya
6 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I'm back again looking for your precious help-
This time I need to merge two text files with matching two fields, output only common records with mixed output.
Let's look at the example:
FILE1
56153;AAA0708;3;TEST1TEST1;
89014;BBB0708;3;TEST2TEST2;
89014;BBB0708;4;TEST3TEST3;
... (7 Replies)
Discussion started by: emare
7 Replies
LEARN ABOUT PHP
number_format
NUMBER_FORMAT(3) 1 NUMBER_FORMAT(3)
number_format - Format a number with grouped thousands
SYNOPSIS
string number_format (float $number, [int $decimals])
DESCRIPTION
string number_format (float $number, int $decimals, string $dec_point = ".", string $thousands_sep = ",")
This function accepts either one, two, or four parameters (not three):
If only one parameter is given, $number will be formatted without decimals, but with a comma (",") between every group of thousands.
If two parameters are given, $number will be formatted with $decimals decimals with a dot (".") in front, and a comma (",") between every
group of thousands.
If all four parameters are given, $number will be formatted with $decimals decimals, $dec_point instead of a dot (".") before the decimals
and $thousands_sep instead of a comma (",") between every group of thousands.
PARAMETERS
o $number
- The number being formatted.
o $decimals
- Sets the number of decimal points.
o $dec_point
- Sets the separator for the decimal point.
o $thousands_sep
- Sets the thousands separator.
RETURN VALUES
A formatted version of $number.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.4.0 | |
| | |
| | This function now supports multiple bytes in |
| | $dec_point and $thousands_sep. Only the first |
| | byte of each separator was used in older ver- |
| | sions. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
number_format(3) Example
For instance, French notation usually use two decimals, comma (',') as decimal separator, and space (' ') as thousand separator.
This is achieved with this line :
<?php
$number = 1234.56;
// english notation (default)
$english_format_number = number_format($number);
// 1,235
// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56
$number = 1234.5678;
// english notation without thousands separator
$english_format_number = number_format($number, 2, '.', '');
// 1234.57
?>
SEE ALSO
money_format(3), sprintf(3), printf(3), sscanf(3).
PHP Documentation Group NUMBER_FORMAT(3)