I'm having an issue where the Mac version of nl
will mark a new line after 2048 characters. I tried it on Linux, and it doesn't do this. Any idea why it does on Mac, and how to fix it?
Mac nl only takes lines 2048 chars long
command lineterminal
Related Question
- Visually distinguish different lines (for long wrapped lines) in iTerm2 / Terminal
- Shell scripting: Why does only the “-” hyphen throw an error
- MacOS – Bash Ctrl-A Returns to Start of Line but Doesn’t Display Properly
- MacOS – Startup Disk full – Read-only- cannot boot Mac Mini
- MacOS – How to fix the terminal when editing the PATH in .bash_profile has the startup hang and I get no prompt
- Large .bash_profile increasing time for terminal to do things. Able to fix
- MacOS – Path into PS1 prompt is broken (\n) on different lines when it is too long
Best Answer
From
man nl
:To fix, you can either patch the source yourself (might need some work) or get the source for the Linux version (which is probably available on any GNU server).