bug-bash
[Top][All Lists]
Advanced

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

Re: a patch to fix sh_stat on SunOS


From: Dmitry Goncharov
Subject: Re: a patch to fix sh_stat on SunOS
Date: Sun, 21 Aug 2016 22:27:48 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Aug 21, 2016 at 04:03:05PM -0400, Grisha Levit wrote:
> On Aug 20, 2016 9:32 PM, "Dmitry Goncharov" <dgoncharov@users.sf.net> wrote:
> > With this new contract how can the user write portable bash code which
> tests if a fd refers to a pipe?
> 
> The test command seems to have the behavior you expect.
> 
> $ uname
> SunOS
> $ mkfifo /tmp/pipe
> $ cat < /tmp/pipe &
> [1] 25376
> $ exec 6>/tmp/pipe
> $ test -p /dev/fd/6 && echo pipe
> $ /usr/bin/test -p /dev/fd/6 && echo pipe
> pipe

Thank you.
i switched to ksh. However, this is also an option.

regards, Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]