shebang.req: don't read the whole script
$ (echo '#!/usr/bin/perl'; cat /dev/zero) |sed -n '1s|^#![[:space:]]*/|/|p;q' /usr/bin/perl $
This commit is contained in:
parent
b81a3b6b75
commit
47bd8eff65
@ -6,7 +6,7 @@
|
||||
ShebangReq()
|
||||
{
|
||||
local f="$1" line=; shift
|
||||
line=$(sed -n '1s|^#![[:space:]]*/|/|p' "$f")
|
||||
line=$(sed -n '1s|^#![[:space:]]*/|/|p;q' "$f")
|
||||
[ -n "$line" ] || return 0
|
||||
set -- $line
|
||||
case "$#,$1" in
|
||||
|
Loading…
Reference in New Issue
Block a user