May 6, 2007 #1 santhas Technical User Aug 27, 2003 35 AU Hi AWK gurus, What is the quick way to print a file containing values 1 2 3 4 5 to as 1:2:3:4:5 Thanks San
Hi AWK gurus, What is the quick way to print a file containing values 1 2 3 4 5 to as 1:2:3:4:5 Thanks San
May 6, 2007 #2 Annihilannic MIS Jun 22, 2000 6,317 AU Code: awk 'NR>1 {printf ":"} {printf $0} END {print ""}' For every line excluding the first, print a ":" prefix. For every line including the first, print the value without a carriage return. At the end print a carriage return. Annihilannic. Upvote 0 Downvote
Code: awk 'NR>1 {printf ":"} {printf $0} END {print ""}' For every line excluding the first, print a ":" prefix. For every line including the first, print the value without a carriage return. At the end print a carriage return. Annihilannic.