Popular recipes tagged "sh"http://code.activestate.com/recipes/tags/sh/2011-08-21T07:27:05-07:00ActiveState Code RecipesTeach the hashbang header new tricks using a dual mode shell/python script (Python) 2011-08-21T07:27:05-07:00Oren Tiroshhttp://code.activestate.com/recipes/users/2033964/http://code.activestate.com/recipes/577851-teach-the-hashbang-header-new-tricks-using-a-dual-/ <p style="color: grey"> Python recipe 577851 by <a href="/recipes/users/2033964/">Oren Tirosh</a> (<a href="/recipes/tags/hashbang/">hashbang</a>, <a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/options/">options</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sh/">sh</a>, <a href="/recipes/tags/shell/">shell</a>). </p> <p>This dual-mode script is both a Posix shell script and a python script. The shell part looks like a triple-quoted string to the Python interpreter. The shell does not reach anything after the exec statement.</p>