Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

split and get last

Use rev command altogether with cut command as follows:
echo "a1 a2 a3 a4 a5" | rev | cut -d ' ' -f '1' | rev
#rev reverses string, then you cut from 2th field to end and reverse back
Comment

split string on last element

stringCutted = myString.Substring(myString.LastIndexOf("/")+1);
Comment

PREVIOUS NEXT
Code Example
Shell :: ssh-copy powershell 
Shell :: phpcs diferent xml 
Shell :: how to install cuda on ubuntu 
Shell :: yarn install raspberry pi 
Shell :: how to install mongoose globally 
Shell :: pdf to jpg terminal 
Shell :: how to login github in terminal 
Shell :: ailure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user] 
Shell :: how to WSL2 
Shell :: repository commands 
Shell :: how to install add-apt-repository 
Shell :: How install packages from package.tar.gz on rstudio 
Shell :: docker install ubuntu command line 
Shell :: change file read only permissions linux 
Shell :: install rabbitmq docker image 
Shell :: how to add key pair to ec2 instance terraform 
Shell :: generate ssh key 
Shell :: docker-compose build context tag own name 
Shell :: yarn remove 
Shell :: replace delimiter for enter command 
Shell :: github add image to readme.md 
Shell :: crontab error log 
Shell :: react hook install 
Shell :: float right in react js 
Shell :: github add directory to repository 
Shell :: how to deploy to netlify using git bash 
Shell :: how to open sublime in linux 
Shell :: how to set git password 
Shell :: how to setup vim plugins 
Shell :: bash script command not found 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =