Unix shell output redirection help

Hi all,

Actually i need to know whether there is any way to redirect the output of shell operations into any file without pipe .

Actually my problem is , i run some command & its result is displayed on shell after some calculations on shell, so if i redirect its output to file, it is not getting written over there.

eg echo <SOME COMMAND> | tee -a file.txt

So after this there is nothing in this file. instead the result is shown on shell terminal after 3 or 4 seconds. So i just need to know if i can set any variable so that it can re direct that output to file. or there is any other way of doing it.

Thanks in advance

Thanks
Sarbjit

Is this a homework assignment? This is similar question:

I need the solution urgently.

You are not getting my point, if i use redirection it doesn't displays the result in file. It move to next command. So what i need is to redirect stdout output to file so that i can have that result.

Maybe you're not getting my point: Is this a homework question?

Hi franklin

yeah you can say that. I am working on some project and i need this info to be dumped in a file.

Now getting to point, Is it possible to redirect stdout output to file. i have tried using pipe symbol and redirection operators but, it doesn't writes that to file, i have even tried using sleep command, but of no success.

Can you please let me know how to proceed

Thanks

---------- Post updated at 07:17 PM ---------- Previous update was at 07:16 PM ----------

Hi franklin

yeah you can say that. I am working on some project and i need this info to be dumped in a file.

Now getting to point, Is it possible to redirect stdout output to file. i have tried using pipe symbol and redirection operators but, it doesn't writes that to file, i have even tried using sleep command, but of no success.

Can you please let me know how to proceed

Thanks

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.