If a do:IFS=/ read -ra PARTSAnd type in a path manually, it creates the array PARTS as hoped, however:IFS=/ read -ra PARTS <<< $(pwd)creates an array with a single element, with the slashes converted to spacesHow can I split the current working directory into an array?
Splitting the working directory in a bash script
bash;shell script;quoting;string;array
It works if you quote the command.IFS=/ read -ra PARTS <<< $(pwd)for i in ${PARTS[@]}do  printf '%s\n' $idonehomeuser1