Try removing the .sh filename extension from the script. Xcode is the default app for opening files with a .sh extension and LB is processing your ~/foo.sh script that way instead of honoring its shebang.
In a test here, when using LB to run a shell script named ~/bin/om-find (with a #!/bin/sh shebang and no extension) the expected output was displayed in a newly-opened Terminal window. Adding the .sh extension causes it to be opened with Xcode, like with the script on your system.
At least on my systems, Terminal is the default app for executable files without extensions. In LB, a small Terminal icon before the filename identifies them. Scripts that'll open with Xcode have generic icons, with a right pointing triangle indicating that Right-Arrow subitem navigation is possible (which, in this case, displays the script text).
You can also invoke File > Get Info (Command-I) on file/folder items in LB to open a Finder Info window and see the "Open with:" app that LB will use (when there is one).
In a test here, when using LB to run a shell script named ~/bin/om-find (with a #!/bin/sh shebang and no extension) the expected output was displayed in a newly-opened Terminal window. Adding the .sh extension causes it to be opened with Xcode, like with the script on your system.
At least on my systems, Terminal is the default app for executable files without extensions. In LB, a small Terminal icon before the filename identifies them. Scripts that'll open with Xcode have generic icons, with a right pointing triangle indicating that Right-Arrow subitem navigation is possible (which, in this case, displays the script text).
You can also invoke File > Get Info (Command-I) on file/folder items in LB to open a Finder Info window and see the "Open with:" app that LB will use (when there is one).