def is_sh(executable):
try:<EOL><INDENT>fp = open(executable)<EOL>magic = fp.read(<NUM_LIT:2>)<EOL>fp.close()<EOL><DEDENT>except (OSError,IOError): return executable<EOL>return magic == '<STR_LIT>'<EOL>
Determine if the specified executable is a .sh (contains a #! line)