NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: awk flea?



On Sun, Jun 14, 2009 at 09:39:54PM +0200, Petar Bogdanovic wrote:
> 
> it's a bit funny that awk tries to close /dev/stdin even in the
> situation where stdin is not used at all:
> 
>       $ cat foo.sh
>               #!/bin/sh
> 
>               foo() {
>                       awk '' /etc/rc.conf
>               }
> 
>               /bin/cat <<-EOF
>                       $(foo)
>               EOF
>       $ ./foo.sh
>               awk: i/o error occurred while closing /dev/stdin
>                source line number 1
> 
>       $

Seems to be a /bin/sh feature/bug, since I don't get this error when
using /bin/ksh as the interpreter.



   Petar Bogdanovic





Home | Main Index | Thread Index | Old Index