On occasion I’ve made shell-scripts for Linux available within this blog, and not used code-blocks to do so, rather linking to an actual .SH File, with which URLs on my server may end.
This brings up the issue, that under Windows, any sort of plain text-file will have its lines terminated by a ‘Carriage-Return’, ‘Line-Feed’ sequence, while Linux tends to terminate them just with a ‘Line-Feed’ character.
If a Windows user downloads a Linux-formatted text-file and tries to open it, chances are that the absence of carriage-returns will prevent any Windows application from even displaying it correctly. Conversely, if a Linux-based ‘bash’ interpreter is given a Windows-formatted file to interpret, there have been reports about errors. At the same time, there is little chance that a Windows user will ever try to get a ‘bash’ shell-script to run under Windows.
So, in certain cases it’s trivial for me to convert my Linux-formatted newlines, into Windows-formatted newlines. This can be done for .CPP Files, which any compiler will still compile fine, even on a Linux-based system. But, I disabled this procedure for .SH Files, because those will never be run on Windows-based systems.
As a result, Windows users may experience difficulties, just getting the .SH Files to display correctly – and then imagining how well they might run under Linux.