Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

split string and create array bash

my_array=($(echo $string | tr "," "
"))
Comment

How to split a string in bash

string="you got a friend in me"
IFS=' ' read -ra split <<< "$string"
echo "${split[*]}"
# Output: you got a friend in me
echo "${split[3]}"
# Output: friend
Comment

split bash string

IN="bla@some.com;john@home.com"
arrIN=(${IN//;/ })
Comment

split string and create array bash

IFS=', ' read -r -a array <<< "$string"
Comment

PREVIOUS NEXT
Code Example
Shell :: how to check default path of the nginx 
Shell :: install redis windows 10 
Shell :: find linux 
Shell :: minikube memory size 
Shell :: docker compose latest version install ubuntu 
Shell :: sample bash script 
Shell :: push existing repo 
Shell :: remove mongo lock file from centos 7 
Shell :: install postman 
Shell :: converting mp3 with FFMPEG 
Shell :: add ssh keys to github 
Shell :: vim replace multiple lines 
Shell :: how to get git stash changes back 
Shell :: how to set up git user 
Shell :: linux how many cores 
Shell :: git flow new feature branch 
Shell :: linux gz unzip 
Shell :: no space left on device 
Shell :: change remote origin git 
Shell :: docker up frce recreate 
Shell :: Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager. 
Shell :: change directory on WSL 
Shell :: read string by string in file in linux 
Shell :: how to remove git commit history 
Shell :: sh or bash validate if file no exist 
Shell :: uninstall ros2 foxy 
Shell :: linux bash clean up log files in /var/log 
Shell :: git check if there are staged changes 
Shell :: vagrant box remove version 
Shell :: install mpg321 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =