Search code examples
cshtcsh

How to execute the results of a pipe in csh?


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

Solution

  • Try this:

    eval `cat test_file`
    

    But look out for code injection.