I am running a very simple bash script on Macosx Yosemite
#!/bin/bash
makefilePath=$(echo $(pwd)/make.sh | sed 's/ /\\ /')
echo $makefilePath
source "$makefilePath"
The first three lines work as expected, but the fourth line creates a returns an error No such file or directory
, even though if I run the command from makefile
directly in the shell by copy pasting it, it works fine.
I don't know what the problem is. Please help.