Search Results

Search: Posts Made By: suren.bills
3,201
Posted By suren.bills
Much thanks to Don Cragun.. I just added locale...
Much thanks to Don Cragun.. I just added locale variable to his last code and it is working fine..

export LC_NUMERIC=en_US
3,201
Posted By suren.bills
Tried with both the codes mentioned.. output is...
Tried with both the codes mentioned.. output is not having commas whereas I'm expecting to be as currency field..

first code:

Decimal Places=2
Input=345987
Output=345987.00
Decimal...
3,201
Posted By suren.bills
we have only ksh.. below is the work with...
we have only ksh..

below is the work with hard coded value.. resulted good.. but can you use the below command into your code and try it.. because I'm not able to use your code with the below...
3,201
Posted By suren.bills
same issue.. used /usr/bin/printf instead of...
same issue.. used /usr/bin/printf instead of printf
+ + /usr/bin/printf %'.*f\n 2 345987
printf: bad conversion
printf: bad conversion
output_string=.*f
.*f
+ printf number_of_positions=%d\n 2...
3,201
Posted By suren.bills
Sorry!! edited my last reply bit late.. ...
Sorry!! edited my last reply bit late..

Here is the same information..

OS version - AIX version 6.1
Korn Shell version - Version M-11/16/88f
3,201
Posted By suren.bills
Thanks for prompt response.. copied same...
Thanks for prompt response..

copied same code into sample script and executed. below is the output i see.. i just pasted for one value..

+ + printf %'.*f\n 2 345987
printf: bad conversion...
3,201
Posted By suren.bills
This is my work related.. in development we have...
This is my work related.. in development we have bash shell... below command is working fine.. but in prod environment we have korn shell and the same command is failing..

COL_VAL_2=`printf...
3,201
Posted By suren.bills
Korn Shell manipulating the string into dynamic currency number
Conversion of string into currency value..

ex1:

number_of_positions=2
input_string=345987

Output= 345,987.00

ex2:

number_of_positions=4
input_string=1345987

Output=...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy