Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux command print only odd columns

awk '{for(x=1;x<=NF;x++)if(x % 2)printf "%s", $x (x == NF || x == (NF-1)?"
":" ")}' ahj.txt
Source by www.linuxquestions.org #
 
PREVIOUS NEXT
Tagged: #linux #command #print #odd #columns
ADD COMMENT
Topic
Name
5+3 =