Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

percentage

Status
Not open for further replies.

sabetik

IS-IT--Management
Nov 16, 2003
80
GU
I have have field f3 = 25.20 and need to get 1.15 of the 25.20. 15% plus f3


what is the right statment.

Thanks
Kamran
 
You can also format the result:

echo field1 field2 25.20 | awk '{printf "%.2f\n" 1.15*$3}'
28.98

echo field1 field2 25.20 | awk '{printf "%8.2f\n" 1.15*$3}'
28.98

You get the idea.



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top