Re: [PATCH] selftests: make shell scripts POSIX-compliant

2025-02-18 Thread Waiman Long
On 2/16/25 7:02 AM, Aditya Dutt wrote: Changes include: - Replaced [[ ... ]] with [ ... ] - Replaced == with = - Replaced printf -v with cur=$(printf ...). - Replaced echo -e with printf "%b\n" ... The above mentioned are Bash/GNU extensions and are not part of POSIX. Using shells like dash or n

Re: [PATCH] selftests: make shell scripts POSIX-compliant

2025-02-16 Thread Hangbin Liu
On Sun, Feb 16, 2025 at 06:11:51AM -1000, Tejun Heo wrote: > On Sun, Feb 16, 2025 at 05:32:25PM +0530, Aditya Dutt wrote: > > Changes include: > > - Replaced [[ ... ]] with [ ... ] > > - Replaced == with = > > - Replaced printf -v with cur=$(printf ...). > > - Replaced echo -e with printf "%b\n" ..

Re: [PATCH] selftests: make shell scripts POSIX-compliant

2025-02-16 Thread Tejun Heo
On Sun, Feb 16, 2025 at 05:32:25PM +0530, Aditya Dutt wrote: > Changes include: > - Replaced [[ ... ]] with [ ... ] > - Replaced == with = > - Replaced printf -v with cur=$(printf ...). > - Replaced echo -e with printf "%b\n" ... > > The above mentioned are Bash/GNU extensions and are not part of

[PATCH] selftests: make shell scripts POSIX-compliant

2025-02-16 Thread Aditya Dutt
Changes include: - Replaced [[ ... ]] with [ ... ] - Replaced == with = - Replaced printf -v with cur=$(printf ...). - Replaced echo -e with printf "%b\n" ... The above mentioned are Bash/GNU extensions and are not part of POSIX. Using shells like dash or non-GNU coreutils may produce errors. They