0
for executablefile in ./*.out; do executablefile; done

It should be self-explanatory from the title what I am trying to do in bash. Unfortunately, none of the tutorials online comes close to this. Can you post a working example and explain your changes?

Cyrus
  • 77,979
  • 13
  • 71
  • 125
shuhalo
  • 5,252
  • 7
  • 40
  • 56

1 Answers1

0

Have you tried using the proper variable syntax?

for executablefile in ./*.out; do "$executablefile"; done
Poshi
  • 4,817
  • 3
  • 13
  • 28
  • Properly speaking you should use double quotes around the variable interpolation, in case the wildcard matches anything which contains shell metacharacters. See also https://stackoverflow.com/questions/10067266/when-to-wrap-quotes-around-a-shell-variable – tripleee Sep 05 '18 at 07:02
  • Of course not; then I'd have posted a separate answer instead. – tripleee Sep 05 '18 at 07:04