【发布时间】:2020-03-23 22:42:14
【问题描述】:
我正在学习 Perl 和 Shell 脚本,我遇到的挑战是编写一个将 csv 文件作为参数的 shell 脚本,然后让该 shell 脚本运行我的 perl 脚本 (test.pl)。我似乎无法获得正确的语法,并且每次都终止,因为它挂断了我的终端。
例如 shell 脚本是 test.sh
#/bin/bash
./test.pl $i`
在我的终端上我写出来
test.sh testfile.csv
最终我希望我的 perl 脚本能够读取测试文件,以便它可以运行。
【问题讨论】:
-
你试过
perl test.pl $1吗? -
@fra 谢谢!用 1 美元换掉 $i 有帮助!