Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

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
Comment

PREVIOUS NEXT
Code Example
Shell :: upgrade powershell 
Shell :: clone repo 
Shell :: powershell search array 
Shell :: bash get unique lines 
Shell :: remove empty page pdf 
Shell :: shell redirect all to /dev/null 
Shell :: git clone with long file names 
Shell :: sed until first match 
Shell :: react navigation stack 
Shell :: github download 
Shell :: debian 10 install jenkins 
Shell :: install dbeaver using snap 
Shell :: get last 10 lines of log 
Shell :: how to create docker secret in kubernetes 
Shell :: git hard reset origin 
Shell :: working fork linux c compiler 
Shell :: create public and private key for jwt 
Shell :: uninstall flake 8 in vs 
Shell :: delete everythng after a certain commit 
Shell :: bash maximum running time 
Shell :: install lua on ubuntu 
Shell :: Ansible gather facts with adhoc command 
Shell :: Endpoint Security VPN build 986000724 is already installed on this computer. 
Shell :: bash add user to group 
Shell :: Create Flask Virtual Environments 
Shell :: how to delete branch git cli 
Shell :: linux remove single quotes from string 
Shell :: change user permission linux 
Shell :: cp exclude file 
Shell :: how to install mongodb in ubuntu 20.04 stackoverflow 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =