• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

unix eval tool

hoppa

Senior member
I've got a program that prints out a bunch of commands that I want to then be evaluated but I don't know the correct command for the job. Basically I want

perl blah.pl | eval

or something similar. Does such a thing exist?

-andy
 
Originally posted by: Nothinman
You probalby need eval `perl blah.pl` since I don't think eval accepts commands on stdin.

If that doesn't work, you can redirect the output of your perl script to a file then write a quick bash script to loop through the info.

perl blah.pl > /home/daishan/file

#!/bin/bash

for command in `cat /home/daishan/file`;

do

eval $command

done
 
Back
Top