Fix Linux compilation errors and warnings

Bash linux errors and warning fixes

See Issue #14025