Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

awk columns

File: 
0.9848077530  -0.1736481777 0.9396926208  
0.9848077530  -0.1736481777 0.9396926208  
0.9848077530  -0.1736481777 0.9396926208 

cat file | awk '{print $1}' 
cat file | awk '{print $2 $3}'
cat file | awk '{print $NF}' # last colomn
cat file | awk '{print $(NF-2)}'  # two column before the last

 
PREVIOUS NEXT
Tagged: #awk #columns
ADD COMMENT
Topic
Name
4+2 =