in reply to how to redirect to other file using system command or anything not by file handler

i want above output in other file without using file handler ..i think it is system command or anythink else help appreciated.

Usually, it is a bad idea to involve the shell. You have to fork the shell and execute the command which will open, write, and close the file. As a bonus, the shell will interpret your data on the way to the file so you will need to escape the data properly or open a big can of worms that includes a gaping security hole.

It is much faster and less error prone to open, write, and close a file handle yourself (as tospo has demonstrated). If you really want the shell to process your output, you'll want to use backticks, system or open a pipe to execute a shell command like echo.

  • Comment on Re: how to redirect to other file using system command or anything not by file handler