wait command behaves differently on Bash and Ash – Ubuntu
Given the following simple snippet, saved in a file named test.sh: sleep 3 && exit 50& echo "Wait for ${!} for the first time." wait "${!}" echo "Exit code is: ${?}" sleep 1 # this line makes a difference echo…