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 :: where are fonts on linux 
Shell :: wsl 
Shell :: ubuntu install lamp 
Shell :: bash else if 
Shell :: Kubectl get memory usage of pod 
Shell :: Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings. 
Shell :: ubuntu folder size 
Shell :: delete auto purge 
Shell :: docker why my container start on reboot 
Shell :: root folders via gui ubuntu 
Shell :: download ubuntu 16.04 iso 64-bit 
Shell :: kill x server 
Shell :: run php in browser localhost 
Shell :: command to update ubuntu 
Shell :: How to Change Your MySQL/phpmyadmin Password in XAMPP 
Shell :: docker remove dangling images 
Shell :: how to activate virtual environment in ubuntu 
Shell :: sed replace number 
Shell :: remove all branches deleted on remote 
Shell :: ip route delete linux 
Shell :: conda install pymodbus 
Shell :: how to install apt 
Shell :: undercover mode kali 
Shell :: tree command 
Shell :: bash if is link simbolico 
Shell :: git push an existing repo from cmd/bash 
Shell :: openssl check certificate expiration 
Shell :: shutdown command rhel 7 
Shell :: kivy install ubuntu 20 
Shell :: linux show file line size 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =