Penguin

Differences between current version and predecessor to the previous major change of AWKNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 4 Last edited on Tuesday, October 16, 2007 4:09:08 pm by AlastairPorter
Older page: version 3 Last edited on Sunday, December 10, 2006 12:02:17 pm by IanMcDonald Revert
@@ -22,4 +22,10 @@
 *awk -v awkvar=$bashvar {print awkvar} 
  
 Now you can use awkvar in your awk statements which will have the value of bashvar. 
 Remember you *CANNOT* change the value of a bash variable using [AWK]. 
+  
+! Floating point output  
+you can use printf modifiers to specify the output of numbers, for example  
+<verbatim>  
+printf "%.02f",a/b  
+</verbatim>