[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Missing stdin in bash script.
From: |
Bob Proulx |
Subject: |
Re: [Help-bash] Missing stdin in bash script. |
Date: |
Sat, 24 Oct 2015 14:19:38 -0600 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Jin Li wrote:
> I have one problem as below:
> 1. I have one script file, say 'test.sh':
Thank you for the very nice and clear test case! That is much
appreciated.
> #!/usr/bin/env bash
> cat > xxx.txt
>
> 2. Running command as:
>
> $ ./test.sh <<< aaa
>
> Get the error:
>
> cat: -: Stale file handle
>
> 3. Running like below works:
>
> echo "aaa" | ./test.sh
What version of bash are you using?
echo $BASH_VERSION
I could not reproduce this problem with the bash 4.3.42 on my system.
Nor with 4.2.37 on another system. Nor 3.2.39 on a much older system.
I didn't try every possible version of bash but I presume that this is
a version specific bug that has been fixed in later versions.
Bob