wget -c "https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/codesys-ide/install2.sh?format=raw"
should also contain the -O option:
wget -c "https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/codesys-ide/install2.sh?format=raw" -O install2.sh