Re: Need blocking /dev/null

Tim Walberg
2001-11-02T20:46:31Z

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

I think that

find / -name foo 2>&-

should do the trick (under ksh, anyway, and
probably zsh or bash as well). Csh variants
IIRC don't have the concept of closing a
file descriptor...

tw

>>
>> The initial question was how to do
>>
>> find / -name foo 2> /dev/null
>>
>> or similar if /dev/null is not present. (Eat is a place holder for a
>> imaginary progrom acting as /dev/null replacement).
>>
>> I guess
>>
>> find / -name foo 2>/dev/stdout 1>/dev/stderr | eat
>>
>> would (kinda) work, but it fails if you want to do
>>
>> find / -name foo 2> /dev/null | less
>>
>> Can be done with named pipes, though.
>>
>>
>> -- v --
>>
>> v@iki.fi
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
End of included message

--
+--------------------------+------------------------------+
| Tim Walberg | twalberg@mindspring.com |
| 830 Carriage Dr. | www.concentric.net/~twalberg |
| Algonquin, IL 60102 | |
+--------------------------+------------------------------+

[-- Attachment #2: Type: application/pgp-signature, Size: 175 bytes --]