Re: Redirecting output

2007-12-19 Thread [EMAIL PROTECTED]
Dan Nelson, on Tue, 18 Dec 2007 12:09:44 -0600, wrote and correctly noted
 (I assume you mean /dev/null 21 )
but later wrote (quoting the previousa sriter
 {command} dev/null 21
which should have been
 {command} dev/null 21

_
Find and download all of your favorite music! Click now!
http://thirdpartyoffers.juno.com/TGL2121/fc/Ioyw6i3nBrp9HfImltKP3Neg2FWxRWDDwyQX7c4K2ui38qPh8OT7pP/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Redirecting output

2007-12-18 Thread White Hat
I am trying to find out exactly what is the difference between:
 
{command} 21  /dev/null
 
and
 
{command} dev/null 21
 
I have seen both used and have not been able to decipher what the difference 
is. It would seem that the first one would be the one that is correct.
 
-- 
White Hat 
[EMAIL PROTECTED]


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Redirecting output

2007-12-18 Thread Dan Nelson
In the last episode (Dec 18), White Hat said:
 I am trying to find out exactly what is the difference between:
  
 {command} 21  /dev/null
  
 and
  
 {command} dev/null 21
(I assume you mean /dev/null 21 )

 I have seen both used and have not been able to decipher what the
 difference is. It would seem that the first one would be the one that
 is correct.

If you want to redirect both stderr and stdout to /dev/null, the 2nd is
correct.  Your first command does this:

  assign fd 2 to whatever fd 1 is pointing to
  assign fd 1 to /dev/null

That leaves stderr going to wherever stdout usually goes (i.e. your
tty), and stdout going to /dev/null.  That might actually be what you
want, depending on the program you're running.

Your second command does this:

  assign fd 1 to /dev/null 
  assign fd 2 to whatever fd 1 is pointing to

I ran this test script with different redirections to verify what was
going on:

 #! /bin/sh
 echo I am stdout
 echo I am stderr 12

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Redirecting Output Into The Copy Buffer

2004-07-12 Thread Jason Dusek
Hi,
Most of the time, when I click the third mouse button something gets pasted 
wherever my cursor is. Presumably it gets pasted from some buffer somewhere, 
let's call it the X buffer or buffer X. Is there some way to redirect the output 
of a terminal command into the X buffer? Then I can run something like this:

  5 # dmesg  [wherever the X buffer is]
and then click the third button to drop the output into a mail message.
- Jason
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Redirecting Output Into The Copy Buffer

2004-07-12 Thread Dan Nelson
In the last episode (Jul 12), Jason Dusek said:
 Most of the time, when I click the third mouse button something gets
 pasted wherever my cursor is. Presumably it gets pasted from some
 buffer somewhere, let's call it the X buffer or buffer X. Is there
 some way to redirect the output of a terminal command into the X
 buffer? Then I can run something like this:
 
   5 # dmesg  [wherever the X buffer is]

Take a look at the x11/xclip port; I think it does what you want.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]