作业帮 > 综合 > 作业

$ cat f1 Hello there.Nice day.$ cat f2 Are you sure about th

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/06/12 17:09:39
$ cat f1 Hello there.Nice day.$ cat f2 Are you sure about that?$ cat f3 This is it.This is end
(The Script)
while( ) {print ;}
print "The value of \$ARGV[0] is $ARGV[0].\n";
(Output)
$ argv.test f1 f2 f3
Hello there.Nice day.
Are you sure about that?
This is it.
This is the end.
The value of $ARGV[0] is .
其中$ argv.test f1 f2 f3的作用是啥?怎样运行这段程序代码?
(The Script)中的代码是以 argv.test 作为文件名吗?
$ cat f1 Hello there.Nice day.$ cat f2 Are you sure about th
argv.test是脚本文件名,f1 f2 f3是脚本参数,作用是传入f1 f2 f3参数执行argv.test.
你这个可能是Linux中的Shell脚本,先创建好argv.test这个脚本文件,如果argv.test放在了PATH变量中指定的系统目录中,就在Shell窗口执行argv.test f1 f2 f3命令,否则要带完整路径执行此命令.
再问: 如果是windowsxp系统这个程序该怎么写?谢谢!
再答: Windows系统就是编写bat批处理文件了,这个不太懂。