Horje
split string in shell script Code Example
split string in shell script
IN="bla@some.com;john@home.com"
arrIN=(${IN//;/ })
echo ${arrIN[1]}                  # Output: john@home.com
split sh string
#YOURSTRING="this_is_an_example"
#output:
#this
#is
#an
#example
for i in $(echo $YOURSTRING | tr "_" "\n")
do
	echo $i
done
split bash string
IN="bla@some.com;john@home.com"
arrIN=(${IN//;/ })
bash split variable by delimiter
IFS='|' read -r -a arrayName <<< "$variable"
split string using linux cmd
$ s='one_two_three_four_five'

$ A="$(cut -d'_' -f2 <<<"$s")"
$ echo "$A"
two

$ B="$(cut -d'_' -f4 <<<"$s")"
$ echo "$B"
four




Shell

Related
undo airmon-ng check kill Code Example undo airmon-ng check kill Code Example
Gitlab Reconfigure Code Example Gitlab Reconfigure Code Example
rust change to nightly Code Example rust change to nightly Code Example
Set wp-config.php using wp-cli Code Example Set wp-config.php using wp-cli Code Example
ubuntu server restart Code Example ubuntu server restart Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11