Aug 26, 2005 #1 sabetik IS-IT--Management Joined Nov 16, 2003 Messages 80 Location 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
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
Aug 27, 2005 #2 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU [tt]echo field1 field2 25.20 | awk '{print 1.15*$3}'[/tt] Annihilannic. Upvote 0 Downvote
Aug 29, 2005 #3 p5wizard IS-IT--Management Joined Apr 18, 2005 Messages 3,165 Location BE 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 Upvote 0 Downvote
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