bash split string into variables
# separator is space
VAR="inforge srl bergamo"
read -r ONE TWO THREE <<< "${VAR}"
echo ${ONE}
echo ${TWO}
echo ${THREE}
# separator is comma
VAR="inforge,srl,bergamo"
IFS="," read -r ONE TWO THREE <<< "${VAR}"
echo "${ONE} ${TWO} ${THREE}"
Also in C++:
- git clone command from github to local
- kill pid
- ubuntu undelete a whole directory
- brew install vscode
- how to install pip
- install gnome on ubuntu wsl2
- ubuntu install yarn
- kill process at a port ubuntu
- install jupyter notebook ubuntu 20.04
- install libreoffice ubuntu
- ubuntu see if package is installed
- check maven version in ubuntu
- codeigniter 4 migrate
- ftp command in linux
- how to install insomnia in ubuntu
- install vinagre ubuntu
- How do I check my WSL version?
- how to remove bin folder from git
- vue-cli-service not found ubuntu
- swapping of two numbers without using third variable in shell script
- pgadmin for linux
- Although GNOME Shell integration extension is running, native host connector is not detected.
- how to install django on windows
- Adding "0" if clock have one digit