This is what I mean:
ls -l *.ec
For each result found, I would like to compile it one at a time.
e.g., for $something.ec:
esql $something.ec -o $something
$something.ec
is original file
$something
is target exe file.
My question is: how can I put that into a loop to go through all the files in my directory?
You can use a for-loop as follows: