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 :: homestead 
Shell :: cholocatey install 
Shell :: linux "echo -e" 
Shell :: how to install google chrome in ubuntu 32-bit 
Shell :: react navigation 5 install 
Shell :: chown ubuntu 
Shell :: git stash specific files 
Shell :: grep in multiple files 
Shell :: substring if statement variable shell script 
Shell :: always asks for ssh-add 
Shell :: adonis run specific seeder 
Shell :: kali nethunter-termux no root 
Shell :: show changes done by a user git bash 
Shell :: how compare 2 file size in bash 
Shell :: ssh secure shell client 
Shell :: jenkinfile.sh 
Shell :: failed at the node-sass@4.13.1 postinstall script. 
Shell :: install nltk.corpus package 
Shell :: pass vairalbe into string dockerfile 
Php :: kill phpstorm 
Php :: enable error logging php 
Php :: o perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host. 
Php :: return last insert id in codeigniter 
Php :: yii2 migration add column 
Php :: check all php version installed ubuntu 
Php :: ReflectionException: Class MagentoFrameworkAppHttpInterceptor does not exist in 
Php :: php remove extension from url 
Php :: php read file line by line 
Php :: Adding or Subtracting Time 
Php :: laravel logout 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =