Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 C 程序和一个包含文件的文件夹,我需要创建一个 shell 脚本来执行该 C 程序并接收一个文件(一个接一个)名称作为命令行读取的参数。我怎样才能做到这一点?
您可以尝试以下 shell 代码:
#!/bin/sh cd /PATH/TO/DIR for i in *; do./C_APP "$i"; done