Apr 23, 2010 #1 jdespres MIS Aug 4, 1999 230 US I would like to rearrange a data file that looks like: server1 policy1 policy2 server2 policy3 server3 policy1 policy3 to look like: server1 policy1 server1 policy2 server2 policy3 server3 policy1 server3 policy3 How can I do this with awk? Thanks.. Joe Despres
I would like to rearrange a data file that looks like: server1 policy1 policy2 server2 policy3 server3 policy1 policy3 to look like: server1 policy1 server1 policy2 server2 policy3 server3 policy1 server3 policy3 How can I do this with awk? Thanks.. Joe Despres
Apr 23, 2010 1 #2 PHV MIS Nov 8, 2002 53,708 FR Code: awk '{for(i=2;i<=NF;++i)print $1,$i}' input > output Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Code: awk '{for(i=2;i<=NF;++i)print $1,$i}' input > output Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Apr 23, 2010 Thread starter #3 jdespres MIS Aug 4, 1999 230 US That did it!!!! Thanks! Joe Despres Upvote 0 Downvote