How can I use awk command to convert values to currency. For example I have a database like follows
John:200
smith:300
kim:405
and want it to out put like this
John $200.00 (3 Replies)
Hi All
I am struggling for the last one week on how to write a regular expression to search a number with currency (such as $ 1, 245, 000.00, Rs. 1, 00, 000.00 etc) but in vain . Please help me. Thanks in advance.
-----Post Update-----
Hi All
I am struggling for the last one... (7 Replies)
I have a common data folder with files like x* which is accessed by 3 unix servers.
Now each server will try to pick one file form this folder and move it to its local folder.
How to maintain file concurrency in this case?I dont want the same file to be accessed by more than one process. (2 Replies)
hi all,
I had my script as
a=qw
b=rter
c=fdfd
curency=1000
printf"${curency} $a $b $c" > filename
can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Here is the code that I am working with. I have tried several other things. any suggestions?
Lbl_Cost_Output.Text = (dDistance * dCostPerMile).ToString("C")
The label is formatted correctly in terms of value 0.00 but no dollar sign appears. Please let me know if you have any questions. (1 Reply)
Discussion started by: briandanielz
1 Replies
LEARN ABOUT MOJAVE
xprintf_comp
XPRINTF_COMP(3) BSD Library Functions Manual XPRINTF_COMP(3)NAME
free_printf_comp, new_printf_comp -- extensible printf compilation
SYNOPSIS
#include <printf.h>
void
free_printf_comp(printf_comp_t pc);
printf_comp_t
new_printf_comp(printf_domain_t restrict domain, locale_t restrict loc, const char * restrict fmt);
DESCRIPTION
To ameliorate some of the slowness caused by the extra overhead in extensible printf (see xprintf(5)), a compile/execute mechanism has been
created. The new_printf_comp() function compiles the given format string, along with a printf domain (see xprintf_domain(3)) and an extended
locale (see xlocale(3)), and returns a printf_comp_t structure. The domain may not be NULL, but the locale can be NULL, which means to use
the current locale, either the per-thread locale if it was set, or else the global locale. Because the printf_comp_t structure records the
domain and locale, care should be taken if either of these are changed.
Once a printf_comp_t structure is created, it can be passed to one of the extensible printf execution variants, described in xprintf_exec(3),
along with the necessary arguments. Creating the printf_comp_t structure needs to be done only once, but it can be passed to extensible
printf execution variants any number of times.
When the printf_comp_t structure is no longer needed, it should be passed to free_printf_comp() to release internal memory.
RETURN VALUES
The new_printf_comp() function returns the new structure, or NULL on error (usually NULL domain or out of memory condition).
SEE ALSO xlocale(3), xprintf_domain(3), xprintf_exec(3), xprintf(5)Darwin Aug 19, 2012 Darwin