Note to self: Windows line endings

January 31, 2025

Something that came up while I was trying to teach myself Bash scripting: Pretty much everything hates Windows-style CRLF line endings. Programs like sed silently fail, and programs like more and vi don't bother showing them. Going into xed I was able to re-save the affected file with Linux LF-only line endings and everything suddenly started working. But it's something to keep in mind with all these files I have from my Windows machine that doesn't really seem to come up in online "how do I do this" discussions.

And the fact that Stack Overflow is full of people who think a question of "how do I do this thing that should take one or two lines" is correctly answered by a wall of text about How Linux Works, along with an over-engineered solution that looks like a screen full of line noise.

January 20, 2025