08-27-2010
How to handle one value below the other
Hi,
I, have an output with 3 different values each below the other like:
[root]# echo $bla
123
345
234
Each value is in one line and for the further processing I need every single value.
For example is there a way to grep line 2, like:
[root]# echo $bla | grep --line 2
345
Thank you in advance
2retti
Last edited by 2retti; 08-27-2010 at 04:55 AM..
10 More Discussions You Might Find Interesting
1. Programming
Hi
I am looking for analog of the Windows "try-except" C code statement that enables target applications to gain control when events that normally terminate program execution occur. (1 Reply)
Discussion started by: vlad
1 Replies
2. UNIX for Advanced & Expert Users
I installed sendmail and pine and I could send emails to other people succesffly. However no matter what I try I cannot receive other people's email. The only messages sitting in my pine inbox are system notifications sent to root@knoppix.
Then I think the problem is that my mail is handled by... (3 Replies)
Discussion started by: onthetopo
3 Replies
3. Shell Programming and Scripting
Hi,
How can I check if a text files is empty?
(With Bash Shell) (5 Replies)
Discussion started by: DNAx86
5 Replies
4. Shell Programming and Scripting
Hi All,
How we can handle decimals in (Float) in UNIX.
a=73
b=5
c=`expr a / b`
i am getting 14 but i need full 14.6 .
Can any one help me pls? (1 Reply)
Discussion started by: subin_bala
1 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have one confusion regarding DST chnages which are going to happen after October. :confused: :confused:
I have few jobs on Autosys which run as per Japan Time. they shoudl not be affected by switiching off of DST time.
Our autosys instance server is based on UK which is running on... (0 Replies)
Discussion started by: girdharsourabh
0 Replies
6. Shell Programming and Scripting
Hi,
Can any one help how to handle the below situation.
Am using Awk script to handle variable
When I open the file in VI mode, I see the string as Orange~Rs , but when I cat the file its showing as plain Oranges.
When I copied the file over to Windows, am seeing the special character... (3 Replies)
Discussion started by: sp999
3 Replies
7. Shell Programming and Scripting
Hi,
I have written a script that sftp's files from linux box to a IBM machine.
Can anybody help me how to handle any errors during SFTP file transfer.
I am writing the SFTP commands onto a file and executing that as you can see below.
while read line
do
if ] && ]; then
echo "put... (1 Reply)
Discussion started by: ramkiran77
1 Replies
8. UNIX for Dummies Questions & Answers
This question might be silly but its confusing me a bit:
What is the difference between handle to the thread HANDLE and thread identifier pthread_t?
---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ----------
Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies
9. Shell Programming and Scripting
I have a script as below , the script can tar file to the tape , however , it is fail to handle the error , if there is error like the backup file is in writing , then it will echo this is fail ( but the file has successful backup actually , so the backup task is succes , but it still report it is... (6 Replies)
Discussion started by: ust
6 Replies
10. Shell Programming and Scripting
I have two servers in subject, say server1 and server2. I have shell scripts on server1. We have a directory on server2 from where the files need to be scp to server1.
The directory on server2 is having space in its name.
I have script on server1 that takes the directory path of server2 as a... (4 Replies)
Discussion started by: Longfellow
4 Replies
LEARN ABOUT PHP
numfmt_format_currency
NUMFMT_FORMAT_CURRENCY(3) 1 NUMFMT_FORMAT_CURRENCY(3)
NumberFormatter::formatCurrency - Format a currency value
Object oriented style
SYNOPSIS
public string NumberFormatter::formatCurrency (float $value, string $currency)
DESCRIPTION
Procedural style
string numfmt_format_currency (NumberFormatter $fmt, float $value, string $currency)
Format the currency value according to the formatter rules.
PARAMETERS
o $fmt
-NumberFormatter object.
o $value
- The numeric currency value.
o $currency
- The 3-letter ISO 4217 currency code indicating the currency to use.
RETURN VALUES
String representing the formatted currency value.
EXAMPLES
Example #1
numfmt_format_currency(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY );
echo numfmt_format_currency($fmt, 1234567.891234567890000, "EUR")."
";
echo numfmt_format_currency($fmt, 1234567.891234567890000, "RUR")."
";
$fmt = numfmt_create( 'ru_RU', NumberFormatter::CURRENCY );
echo numfmt_format_currency($fmt, 1234567.891234567890000, "EUR")."
";
echo numfmt_format_currency($fmt, 1234567.891234567890000, "RUR")."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."
";
echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."
";
$fmt = new NumberFormatter( 'ru_RU', NumberFormatter::CURRENCY );
echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."
";
echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."
";
?>
The above example will output:
1.234.567,89 EUR
1.234.567,89 RUR
1 234 567,89EUR
1 234 567,89.
SEE ALSO
numfmt_get_error_code(3), numfmt_format(3), numfmt_parse_currency(3).
PHP Documentation Group NUMFMT_FORMAT_CURRENCY(3)