bash set var to sed return code example Example: assign variable with sed not working comp=$(echo "$fullName" | sed 's/ //g')