【发布时间】:2015-02-13 08:24:05
【问题描述】:
我阅读了概念解释器文件。但我不知道那有什么用。 考虑我有一个 exec 函数作为
execl("/home/bhuvanesh/hello.sh","hello.sh","-l",NULL);
在那个 hello.sh 我有解释器
#!/bin/ls
当我执行 exec 程序时,它会像一个
"ls -l hello.sh"
linux中的选项..使用这个解释器文件的主要原因是什么? 我认为“/home/bhuvanesh/hello.sh”将被 /bin/ls 取代。但是这个“/home/bhuvanesh/hello.sh”将作为 ls 命令的第一个参数。
【问题讨论】:
-
@Joachim Pileborg - 我无法理解..请深入解释。