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

string to array bash

IFS='$SEP' read -r -a ARRAY <<< "$STRING"
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 :: ssh keygen linux 
Shell :: rename python3 to python 
Shell :: gem pg install error mac os 
Shell :: install clasp 
Shell :: kill all process 
Shell :: how to install jupyter 
Shell :: flutter devices 
Shell :: install python 2.7 kali linux 
Shell :: run ionic capacitor device 
Shell :: linux bash clean up log file 
Shell :: open pdf command line linux 
Shell :: sh is null if 
Shell :: pip install without dependencies 
Shell :: wireshark para ubuntu 
Shell :: default pull settings git 
Shell :: how to check the parent branch in git 
Shell :: git see current commit message 
Shell :: how to link a directory in linux 
Shell :: command line size of directory 
Shell :: vscode tab not working ubuntu windows 
Shell :: install node on ubuntu 
Shell :: how to update kali linux 
Shell :: kubectl port forward 
Shell :: virtual host apache 
Shell :: how to install ssh server on ubuntu 16.04 
Shell :: remove a directory 
Shell :: leap year bash shell 
Shell :: how to turn on hotspot on windows 10 
Shell :: linux login to github via git 
Shell :: git new branch push to remote 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =