Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux awk

# usages
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: #linux #awk
ADD COMMENT
Topic
Name
5+4 =