分页: 1 / 1

估计Linux有bug了。

发表于 : 2010-08-30 13:58
tusooa
自己看吧,这叫什么。

代码: 全选

tlcr: 0 庚寅年七月廿一日 13:51:09 ~
● dog /tmp/test
#!/usr/bin/env perl -w

use 5.010;
say "Hello World";
tlcr: 0 庚寅年七月廿一日 13:51:10 ~
● dog /tmp/test.py
#!/usr/bin/env python -u

print "Hello World\n"

tlcr: 0 庚寅年七月廿一日 13:51:16 ~
● dog /tmp/test.perl
#!/usr/bin/perl -M5.010 -w

say "Hello World";
tlcr: 0 庚寅年七月廿一日 13:51:21 ~
● /tmp/test
/usr/bin/env: perl -w: 没有那个文件或目录
tlcr: 127 庚寅年七月廿一日 13:51:28 ~
● /tmp/test.py
/usr/bin/env: python -u: 没有那个文件或目录
tlcr: 127 庚寅年七月廿一日 13:51:31 ~
● /tmp/test.perl
syntax error at /tmp/test.perl line 0, near "use 5.010 -w"
Execution of /tmp/test.perl aborted due to compilation errors.
tlcr: 255 庚寅年七月廿一日 13:51:34 ~
● 
很显然,/usr/bin/env perl -w被搞成/usr/bin/env 'perl -w'了。 :em20 :em20 :em20

Re: 估计Linux有bug了。

发表于 : 2010-08-30 15:03
tusooa
http://paste2.org/get/969201
被搞成单参数了。

Re: 估计Linux有bug了。

发表于 : 2010-08-30 15:14
astolia
直接#!/usr/bin/perl -w吧

Re: 估计Linux有bug了。

发表于 : 2010-08-30 19:44
aerofox
#! 说明行中只能带一个参数的。