bash split a path with delimiter and get second element code example Example: bash split variable by delimiter IFS='|' read -r -a arrayName <<< "$variable"