Ruby 1.8.5

Ruby 1.8.7

Ruby 1.9.x

"Shebang" lines for scripts on Patas

Line: 38 to 38

#!/usr/bin/ruby

Added:

>>

Ruby 1.9.x

#!/opt/ruby-1.9/bin/ruby

Portable Shebang

When developing scripts in other environments with final testing (and submission of homework) on patas, you may find that your development environment has the desired script binary in one place, and patas has the script binary in another. For example, you need to manually edit the shebang line on your perl scripts every time you move the perl script to patas. One way to get around this is to use /usr/bin/env to find the path for your target script program, in this case perl.

"Shebang" lines for scripts on Patas

Important: If you use this technique with Condor, you must include getenv = true in your Condor submit script; otherwise there won't be a valid PATH variable for /usr/bin/env to work with.

NB: to make sure you are using the same version of perl in both environments, run which perl on each. If your devel version of perl doesn't match the version on patas, fiddle with your PATH environment variable so the proper version is found, or create a link in your local /bin, /usr/bin, or /usr/local/bin to the proper version of perl on your devel machine.

Use of /usr/bin/env is a Good Thing in shebang lines, as it eliminates a lot of manual changes when doing cross-platform script development. And yes Virginia, it will work fine for python and ruby as well.

"Shebang" lines for scripts on Patas

Line: 26 to 31

#!/opt/python-3.0/bin/python3.0

Ruby 1.8.5

Added:

>>

#!/usr/bin/ruby

Added:

>>

Portable Shebang

When developing scripts in other environments with final testing (and submission of homework) on patas, you may find that your development environment has the desired script binary in one place, and patas has the script binary in another. For example, you need to manually edit the shebang line on your perl scripts every time you move the perl script to patas. One way to get around this is to use /usr/bin/env to find the path for your target script program, in this case perl.

For example, you may see the following for the location of perl 5.10 on patas and your devel machine:

NB: to make sure you are using the same version of perl in both environments, run which perl on each. If your devel version of perl doesn't match the version on patas, fiddle with your PATH environment variable so the proper version is found, or create a link in your local /bin, /usr/bin, or /usr/local/bin to the proper version of perl on your devel machine.

Use of /usr/bin/env is a Good Thing in shebang lines, as it eliminates a lot of manual changes when doing cross-platform script development. And yes Virginia, it will work fine for python and ruby as well.