Q&A > input and output
bash$ perl -e '`find > foo`; print \"$!\n\";'
gives me the following output
Bad file descriptor
I can run `find` fine, as long as I don't pipe it or redirect output.
I run the following in Bash version 2.021 with Perl 5.6.0 build 613 on NT 4.00.1381 (4.0) with Service Pack 5.
No file redirection or piping seems to work.
-coyo (running NT due to a past life karma debt, no doubt)
|Answer: Bad file description for win32/bash/perl combo|
contributed by Coyo
Too many files!
Well, I may not have answered the question, but I have found that even putting too large of a string into a backtick operation causes the 'Bad file descriptor' error.
`wc $lots_of_files`;does not work. It can be broken up so to be made to work:
@lots_of_files = split($lots_of_files);Well, that seems to work. It doesn't explain why redirection is failing for me in just about all cases though.
Maybe this is usefull to someone.
Please (register and) log in if you wish to add an answer
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr