Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash substring after character

TEXT="A very long text to read"
echo "${TEXT#*very }" #the string after the substring "very"
#output:
#long text to read

echo "${TEXT% to*}" #the string before the substring " to"
#output:
#A very long text
Comment

PREVIOUS NEXT
Code Example
Shell :: remove trash linux 
Shell :: bind failed address already in use mac 
Shell :: git track lfs 
Shell :: kill server on port mac 
Shell :: adb shell proxy 
Shell :: bash print last n lines of file 
Shell :: uninstall django 
Shell :: better discord in linux 
Shell :: how do i know if a gem is installed 
Shell :: how to grep if the first letter is a character not a number 
Shell :: pull remote branches 
Shell :: git log for specific file 
Shell :: how to add an existing project to github 
Shell :: tor mac command line 
Shell :: wget files matching pattern 
Shell :: mongodb create collection 
Shell :: install chrome in ubuntu 16.04 using terminal 
Shell :: files reset from staging area 
Shell :: hosting spa on github pages 
Shell :: adb find device ip 
Shell :: awk for loop 
Shell :: vite starting code 
Shell :: install vnc on ubuntu 
Shell :: how to assign an ad group to a folder mac os terminal 
Shell :: git global setup 
Shell :: rejected master fetch first 
Shell :: git checkout branch on different remote 
Shell :: docker delete network 
Shell :: linux chmod remove sticky bit 
Shell :: stop processes on port 3000 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =