pipe equivalent to /dev/null ???

Leslie Mikesell les at chinet.chi.il.us
Tue Sep 11 11:38:05 AEST 1990


In article <8720002 at hpdmd48.boi.hp.com> oscarh at hpdmd48.boi.hp.com (Oscar Herrera) writes:

>||Is there an equivalent 'pipe' like entity to /dev/null ?
>||What I'd like to do is something like this 
>||	anycommand | bitbucket
>	Well, I found the answer to my own question.
>		touch bitbucket
>		chmod +x bitbucket
>	Then    
>		ll | bitbucket      
>	works well.

This will work only so long as the process generating the output doesn't
generate enough data to fill a pipe buffer.  Since your "null" program
isn't actually going to read anything, when the pipe fills, the writing
program will block. 
A more reasonable method would be to use "|cat >/dev/null", though the
result is the same as a simple ">/dev/null".  Why did you want the
pipe, anyway?

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.shell mailing list