On Mon, Jun 29, 2009 at 11:18:07AM +0200, Roland Mainz wrote: > "Dr. Werner Fink" wrote: > > On Mon, Jun 29, 2009 at 04:27:45AM +0200, Roland Mainz wrote: > > > It's 4:20h AM here, maybe that's the reason why I don't spot the > > > difference right now: > > > Why does $ ksh93 -c 'tee <( printf "hello\n" )' # hang forever while $ > > > ksh93 -c 'cat <( printf "hello\n" )' # prints "hello" ? > > > > ksh cause tee to report > > tee: /dev/fd/3: Text file busy > > > > bash cause tee to report > > tee: /dev/fd/63: Text file busy > > Erm... on which platform and which version of "tee" is being used ? AST > "tee" ?
/suse/werner> tee --version tee (GNU coreutils) 6.12 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Parker, Richard M. Stallman, and David MacKenzie. > > > and IMHO both is correct. For bash I would use > > > > bash -c 'tee < <( printf "hello\n" )' > > > > but this seems not to work with ksh. > > Ah... now I get it what I did (or better: thinking) wrong: > <( cmd ) replaces "<( cmd )" with a name to a FIFO/pipe, therefore my > construct $ ksh93 -c 'tee <( printf "hello\n" )' # translates into: $ > ksh93 -c 'tee /dev/fd/<fd_to_child_process_with_printf_hello> #' > > Or short: ENOTENOUGHCOFFEE ... that's a known problem :) Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
