Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created March 16, 2013 17:29
Show Gist options
  • Save jorgenschaefer/5177400 to your computer and use it in GitHub Desktop.
Save jorgenschaefer/5177400 to your computer and use it in GitHub Desktop.
<0>orion:~$ cat foo.sh
#!/home/forcer/bar.sh
print "Hello, World"
<0>orion:~$ cat bar.sh
#!/usr/bin/env bash
python "$1"
<0>orion:~$ ./foo.sh
Hello, World
@joelmccracken
Copy link

bash-3.2$ bash --version
bash --version
bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)
Copyright (C) 2007 Free Software Foundation, Inc.
bash-3.2$ cat foo.sh
cat foo.sh
cat foo.sh

!/Users/joel/bar.sh

print "Hello, World"
bash-3.2$ cat bar.sh
cat bar.sh
cat bar.sh

!/usr/bin/env bash

python "$1"
bash-3.2$ ./foo.sh
./foo.sh
./foo.sh
./foo.sh:3: print: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment