[clug] Pointless time-wasting bash questions

Paul Harvey csirac2 at gmail.com
Thu Jun 25 22:21:06 MDT 2015


> If I was to use it for real work I'd "eval ''". e.g.:-
> for i in /GenericAgent. . ; do eval cp 'Kernel/Config${i}pm{.dist,}' ; done

Is the eval necessary? What if ${i} expands to something like:
'; rm -rf $HOME/*; echo '

I suppose it's possible your code there is immune from this style of
thing, but I hate having to think so hard and reason about eval.

Perhaps I've just been over-exposed to bad perl code from the
"meta-programming just means building eval strings" era :)


More information about the linux mailing list