#Possible solution sed -i 's/ //g' script.sh #Just execute command above to fix problem replacing script name for yours ;)