Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

awk command in linux

awk '{$1=""; print}' # print all except first column
awk '{$1=$3=$NF=$(NF-1)=""}1' file # print all except the 1ast and 3rd column and the last 1/2
awk -F"/" '{print $NF}' file #print only the last column
awk -F"/" '{print $NF-1}' file #print only the 2nd column from the end of string
 
PREVIOUS NEXT
Tagged: #awk #command #linux
ADD COMMENT
Topic
Name
1+3 =