shell script - Variable as command; eval vs bash -c - Unix & Linux Stack Exchange
I did a quick test: time bash -c 'for i in {1..10000}; do bash -c "/bin/echo hi"; done' time bash -c 'for i in {1..10000}; eval "/bin/echo hi"; done' (Yes, I know, I used bash -c to execute the loop but that should not make a difference). The results: eva...