I have recently Updated from 14.04.3 LTS to 16.04.2 LTS. My shell scipts that got executed on 14 version are failing in the latest version i.e. 16.04.2.
Below are the sample errors:
test: 24: test: function: not found
test: 25: [: Illegal number: !
test.sh: 33: test.sh: Syntax error: "}" unexpected
The lines have the following information in the script
24 line : function CheckErrors {
25 line : if [ ! $1 -eq 0 ];
then
echo "****************************************"
echo "STEP FAILED: $2 "
echo "Terminating execution and exiting "
echo "****************************************"
exit 1
fi
33 line : }
Are there any changes between both the versions?
#!/bin/bash
in the first line of the script? – Yaron Jun 14 '17 at 10:45