Click to See Complete Forum and Search --> : Simple question from rookie


pcorbett
12-22-2000, 03:48 PM
I am looking for a way to collect output from one program as input to another so I can read it.
The program I want the output from is:
X -probeonly
I have tried X -probeonly > probeout
What is the correct format?
Thanks in advance

TheLinuxDuck
12-22-2000, 04:45 PM
Have you tried X-probeonly | probeout?

I use ls -al | grep ^d to list out the subdirs of the current dir...

------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq

SubPar
12-22-2000, 06:13 PM
If X -probeonly is sending stuff to both stdout and stderr, then you need to do:

X -probeonly >& probeout

to send all the screen output to the file probeout. Using X -probeonly | probeout won't work because that'd try to pipe stdout to the probeout program, which probably doesn't exist.

------------------
Got Konq (http://www.konqueror.org/)?

TheLinuxDuck
12-22-2000, 06:31 PM
Originally posted by SubPar:
Using X -probeonly | probeout won't work because that'd try to pipe stdout to the probeout program, which probably doesn't exist.

He did say that he wanted to pipe the output of one program to the input of another...

So, I'm guessing that probeout is some kind of program (or script, or whatnot), which is why I suggested the | pipe. http://www.linuxnewbie.org/ubb/smile.gif

------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq

pcorbett
12-23-2000, 01:18 AM
Sorry guys if I didn't make myself clear.
What I meant was to catch the output into a file for reading at liesure

camelrider
12-24-2000, 05:02 AM
If the file "probeout" doesn't already exit do "touch probeout", then "X-probeonly > probeout" should do what you want.
Alternatively you can append output to probeout by "X-probeonly >> probeout" and I think this will also create the file on the fly. I think the single redirection (> ) will overwrite probeout.

(edit) I really need to check for typos before I submit these things!

------------------
We'll get thisright yet!

[This message has been edited by camelrider (edited 24 December 2000).]