linux 对设备不适当的ioctl操作,linux-stty:标准输入:设备的不适当的ioctl
perl script.pl --f1="t1" --f2="t2" --f3="t4" --f4 < /home/joe/a.txtscript.pluse Getopt::Long;my ($f1, $f2, $f3, $f4) ;GetOptions ('f1=s' => \$f1,'f2=s' => \$f2,'f3=s' => \$f3,'f4' => \$
perl script.pl --f1="t1" --f2="t2" --f3="t4" --f4 < /home/joe/a.txt
script.pl
use Getopt::Long;
my ($f1, $f2, $f3, $f4) ;
GetOptions (
'f1=s' => \$f1,
'f2=s' => \$f2,
'f3=s' => \$f3,
'f4' => \$f4, );
if ($f1) {
system('stty -echo');
print "Password:";
$pwd = ;
system('stty echo');
}
我收到此错误:
stty: standard input: Inappropriate ioctl for device
Password:stty: standard input: Inappropriate ioctl for device
这是什么错误?我该如何解决?
解决方法:
我认为问题是您正在从重定向的STDIN中读取(因为您< file.txt)
$perl -e 'system("stty -echo");'
stty: standard input: Inappropriate ioctl for device
您可能应该将文件作为参数传递给脚本.
标签:bash,linux,perl
来源: https://codeday.me/bug/20191209/2095887.html
更多推荐
所有评论(0)