Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • That makes sense. One strange thing... There's a difference if I run ssh [email protected] -p 2222 /bin/bash -lc brew (ok) and ssh [email protected] -p 2222 /bin/sh -lc brew (brew not found). Both /bin/sh and /bin/bash show the same GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15). What could be the reason? Commented Mar 21, 2016 at 6:07
  • Bash runs differently when called as sh. See the Bash manual. My guess is that you're setting the PATH in .bash_profile. Commented Mar 21, 2016 at 6:10
  • And I do need that escaping... Otherwise it does not work. Does it work for you without? Commented Mar 21, 2016 at 6:11
  • .bash_profile does not exist. Paths are from /etc/paths. Commented Mar 21, 2016 at 6:13
  • @techraf since I don't use OSX, that's about all I help you with. It should work without the escaping, but maybe the old version of bash does things differently. Commented Mar 21, 2016 at 6:17