如何在Ubuntu上运行perl脚本? 如何执行这个指令码 https://zwitterion.org/software/aggregate-cidr-addresses/
我已经创建了示例中所示的文件aggregate-cidr-addresses。
我已经从服务器的同一目录中复制了文件
然后按照示例所示运行
root@Ubuntu:~$ list-iana-reserved-ranges | aggregate-cidr-addresses
list-iana-reserved-ranges: ukaz ni bil najden (translate command not found)
aggregate-cidr-addresses: ukaz ni bil najden (translate command not found)
还有
root@Ubuntu:~$ perl list-iana-reserved-ranges | aggregate-cidr-addresses
Number found where operator expected at list-iana-reserved-ranges line 2, near "192.168.1.0"
(Missing semicolon on previous line?)
syntax error at list-iana-reserved-ranges line 2, near "192.168.1.0"
Execution of list-iana-reserved-ranges aborted due to compilation errors.
aggregate-cidr-addresses: ukaz ni bil najden (translate command not found)
我有
command not found
如何正确运行?
答案 0 :(得分:2)
要运行Perl脚本,
#!
),您链接到的脚本已经具有: #!/usr/bin/perl
chmod +x list-iana-reserved-ranges aggregate-cidr-addresses
./
(这是一项Linux安全功能,不会在当前目录中意外运行脚本): ./list-iana-reserved-ranges | ./aggregate-cidr-addresses