5

printf format with awk

view full story
linux-howto

http://www.unix.com – Hello Here is an easy one Data file Code: 12345 (tab) Some text (tab) 53.432 23456 (tab) Some longer text (tab) 933.422 34567 (tab) Some different text (tab) 29.309 I need to awk these three tab-delimited columns so that the first two are unchanged (unformatted) and the third shows two decimal places: Desired output Code: 12345 (tab) Some text (tab) 53.43 23456 (tab) Some longer text (tab) 933.42 34567 (tab) Some different text (tab) 29.31 Thanks! (HowTos)