Another clever and simple little tool, this time out of coreutils, where all the good stuff comes from …
Nothing complicated or obtuse here, just convert tabs to spaces. In fact, it’s a little difficult to show what’s going on, since technically there’s nothing to see. 😳
You can tell
expand to use specific numbers of spaces when it replaces, to avoid tabs after non-whitespace characters and even use a list of specific locations for tabs to replace.
But beyond that,
expand is content. Calm as Hindu cows.
Just remember this the next time you have a file littered with tab marks, and you don’t want to go through the hassle of search-and-replacing it again and again. … 😉