redirecting stdout

redirecting stdout

Post by Faisal Nasi » Thu, 08 Jul 1999 04:00:00



I want to redirect stdout to abc.txt file, how do I do that?

I would like to do something like this:

1. Redirect stdout to abc.txt
2. Call a perl program which print some stuff to stdout (it is printed in
abc.txt)
3. Redirect stdout to real stdout.

Is that possible?

p.s. I can't use > and >> for this using shell...

Thank you.

--
Faisal Nasim (the Whiz Kid)
Web: http://wss.hypermart.net/
AOL: Whiz Swift  ICQ: 4265451
FAX: (815) 846-2877

 
 
 

redirecting stdout

Post by Martin Wassman » Fri, 09 Jul 1999 04:00:00



Quote:> I want to redirect stdout to abc.txt file, how do I do that?

> I would like to do something like this:

> 1. Redirect stdout to abc.txt
> 2. Call a perl program which print some stuff to stdout (it is printed in
> abc.txt)
> 3. Redirect stdout to real stdout.

savetty=`tty`
exec >abc.txt
...perl...
exec >$savetty
...

Quote:

> Is that possible?

> p.s. I can't use > and >> for this using shell...

???
Quote:

> Thank you.

> --
> Faisal Nasim (the Whiz Kid)
> Web: http://wss.hypermart.net/
> AOL: Whiz Swift  ICQ: 4265451
> FAX: (815) 846-2877


 
 
 

1. redirecting STDOUT of a bg process to STDOUT of a new xterm

I often start a background process in an xterm and then kill the xterm.
The
process is still running on the machine but it's tty is "?"

Is there a way to redirect this process so that it becomes a job on a
new
xterm?

I want to see what gets printed to STDOUT of this process.

Thanks.

--

**************************************************************
Mike Green                              Intel Corp

ph (602) 552-3428                       5000 W. Chandler Blvd.
fax (602) 554-6006                      Chandler, AZ  85226
**************************************************************
****************My opinions are strictly my own***************

2. Device name for console devices?

3. Redirecting stdout of one program to my program

4. HELP openwin

5. Redirect stdout and stderr in ksh

6. line count weirdness in bash

7. Redirecting stdout in ksh

8. HELP: Wrestling with Large EIDE disk

9. HELP: How to redirect stdout and stderr to a text file.

10. Redirect stdout in C

11. Redirecting stdout/stdin to socket

12. Redirect stdout * stderr to one file in bourne sh using exec

13. Problem redirecting stdout to pipes/files