0

I have a C program and a folder that contains files and I need to create a shell script that execute that C program and receives a file (one by one) name as argument which is read by the command line. How can I do this?

1 Answer 1

1

You could try the following shell code :

#!/bin/sh

cd /PATH/TO/DIR
for i in *; do./C_APP "$i"; done 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.