Date: Wed, 28 Feb 2018 09:03:45 -0500 From: Chet Ramey <chet.ra...@case.edu> Message-ID: <46653602-7efa-9e3c-b477-4d22118fd...@case.edu>
I didn't see the proginal of this message either, but ... | On 2/28/18 5:31 AM, Lakshman Garlapati wrote: | | > The following snippet is working fine in x86 processor machine not working | > in arm processor machine from bash 4.3 version onwards. | > | > test.sh | > ===== | > #!/bin/bash | > rm out.txt | > function abc() { | > if [ 2 -eq 1 ]; then | > echo "TRUE" | > else | > echo "FALSE" | > fi | > } | > abc & | > | > bash -x test.sh | > =========== | > + rm -f out.txt | > + abc | > + '[' 2 -eq 1 ']' | > + echo TRUE <---- Here we are expecting FALSE | > TRUE | > | > please provide some guidance on how to resolve the problem, let me know if | > problem statement is not clear. It appears as if something odd is up there, the "rm out.txt" has been executed as "rm -f out.txt" so either there are aliases involved somewhere, in which case there is a $ENV type script with unknown contents, or the script that is being tested isn't the script shown. In either case, whatever happened needs to be discovered and understood before looking for other possible bugs. kre