title: Sed command not found
body: <p>I have this code:</p>
  
  <pre><code>if [ -d "$PATH" ]; then
  ABSPATH=$( cd "`echo "$1" | sed 's/[^/]*$//'`";pwd)
  fi
  </code></pre>
  
  <p>when I run it, I get this <code>sed: command not found</code>.Any command I put inside this "if" blog writes this message, XXX:command not found. I have no idea why. I have exactly the same code elsewhere in my script and it is fine there.</p>