Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Why do I get a "bad filedescriptor" here? (redirection problem)
- X-seq: zsh-users 10898
- From: "Com MN PG P E B Consultant 3" <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- To: "zsh-users Mailinglist" <zsh-users@xxxxxxxxxx>
- Subject: Why do I get a "bad filedescriptor" here? (redirection problem)
- Date: Wed, 25 Oct 2006 10:52:42 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Thread-index: Acb4Eu7E8mqlozeHRVmYvW2IfrkSzg==
- Thread-topic: Why do I get a "bad filedescriptor" here? (redirection problem)
zsh 4.0.7
$ ls >& -
/bin/ls: write error: Bad file descriptor
$ cat >&- <<<d
cat: standard output: Bad file descriptor
$ ls >/dev/null
$ echo x >& -
$
Why do I get a "bad file descriptor" in the first two cases?
Note that closing stdout with echo works fine, as does
(of course) redirection of ls output to the bit bucket.
And in case this matters:
$ type ls
ls is an alias for /bin/ls --almost-all --color --classify
$ type cat
cat is /bin/cat
Ronald
--
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author