免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 814 | 回复: 9
打印 上一主题 下一主题

怎么在linux as3下执行perl脚本? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-15 17:54 |只看该作者 |倒序浏览
装了linux as3,配cvs的时候,有个生成password的perl脚本,(passwdgen.pl),可是没有办法执行,文件属性我已设为777,请问是为什么?是不是系统缺少什么东西?

论坛徽章:
1
巳蛇
日期:2014-12-29 11:22:41
2 [报告]
发表于 2005-11-15 18:07 |只看该作者
which perl
看看你装了perl的rpm没有
如果没有
rpm -ivh perl*

论坛徽章:
0
3 [报告]
发表于 2005-11-15 18:13 |只看该作者
我看了,有

论坛徽章:
1
巳蛇
日期:2014-12-29 11:22:41
4 [报告]
发表于 2005-11-15 18:15 |只看该作者
perl passwdgen.pl

论坛徽章:
0
5 [报告]
发表于 2005-11-15 18:16 |只看该作者
./filename 记得chmod 770 filename

论坛徽章:
0
6 [报告]
发表于 2005-11-15 18:18 |只看该作者
passwdgen.pl的代码:

#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift; my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}n";
------------------------------------------
在文件所在的目录下输入:passwdgen.pl "originalpassword"
显示bash:passwgen.pl:command not found

论坛徽章:
1
巳蛇
日期:2014-12-29 11:22:41
7 [报告]
发表于 2005-11-15 18:20 |只看该作者
看了你的错误我就明白了

你应该输入
./passwdgen.pl "originalpassword"

论坛徽章:
0
8 [报告]
发表于 2005-11-15 18:20 |只看该作者
执行./passwdgen.pl "originalpassword"
显示:":没有哪个文件或目录t "

论坛徽章:
0
9 [报告]
发表于 2005-11-15 18:21 |只看该作者
./passwdgen.pl "originalpassword" 请记得前的./还有给passwdgen.pl 执行的权限

论坛徽章:
0
10 [报告]
发表于 2005-11-15 18:25 |只看该作者
perl passwdgen.pl
这样可以,但是这样我加参数perl passwdgen.pl  "originalpassword"的时候,每次的结果不一样,是不是本来就应该不一样?(那段代码我看不太懂)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP