You are trying to execute output of a c program using
sh. 

Cheers,
Amol.

--- "D.Venkatasubramanian, Noida"
<[EMAIL PROTECTED]> wrote:
> Hi,
> Simple, compile the program and pipe the output to
> sh or any shell.
> Tested on a Red Hat Linux 7.3 bash shell.
> The shell outputs are given below
> -----------------------Shell outputs
> start--------------------------
> [venkat@eagle venkat]$ cat test.cc
> #include <iostream.h>
> int main()
> {
>         cout << "ls -l";
> }
> 
> [venkat@eagle venkat]$ g++ -otest test.cc
> [venkat@eagle venkat]$ ./test | sh
> ------------------------------Shell output
> ends----------------------------------
> Any explanations why this happens?
> Regards,
> Venky

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

          ================================================
To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header
Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org
          =================================================

Reply via email to