0

I need to execute the results of a pipe, but without using a temp file (the pid needs to stay the same...dang screwy regression system).

So, if I have a test file that contains:

echo Do this

I ideally want to run something like:

cat test_file | eval

That would return this:

Do this
bmk
  • 13,849
  • 5
  • 37
  • 46
SDGator
  • 2,027
  • 3
  • 21
  • 25

1 Answers1

0

Try this:

eval `cat test_file`

But look out for code injection.

DigitalRoss
  • 143,651
  • 25
  • 248
  • 329