Answers for "linux string split"

1

split bash string

IN="[email protected];[email protected]"
arrIN=(${IN//;/ })
Posted by: Guest on April-29-2020
0

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
Posted by: Guest on May-18-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language