Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

shell trim

STR="${STR//(^[ ]+|[ ]+$)/}"

# ${STR//--regex--/--replacement--} = replace all
# ${STR/--regex--/--replacement--} = replace one
# ^[ ]+ = empty character([ ])s(+) at the start(^) of the string
# [ ]+$ = empty character([ ])s(+) at the end($) of the string
# (A|B) = A or B
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install snap store on kali linux 
Shell :: ffmpeg gif images 
Shell :: mongorestore command 
Shell :: command not found: yarn 
Shell :: install kibana 7.17 ubuntu 
Shell :: windows 10 install wsl2 
Shell :: pnpm version 
Shell :: Delete all running and stopped containers 
Shell :: how to switch another branch in git 
Shell :: how to make a shell in c for beginners 
Shell :: pip install in jupyter notebook 
Shell :: ubuntu check chmod 
Shell :: git list stashes 
Shell :: bash for each line of file 
Shell :: kubectl neat 
Shell :: installing a downloaded package in ubuntu 
Shell :: ssh without password 
Shell :: windows edit file cmdp 
Shell :: check file sytem linux 
Shell :: react-icons 
Shell :: ubuntu visual studio path 
Shell :: install dvipng ubuntu 
Shell :: bash remove everything after character x 
Shell :: ImportError: No module named alsaaudio 
Shell :: solana install 
Shell :: origin git 
Shell :: ubuntu install composer 
Shell :: clear teams cache powershell 
Shell :: how to remove git from vs code 
Shell :: make multiple directories with a single command on windows 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =