You’re on a linux-y machine and you want to convert tabs in a file to spaces (say, two) and your editor doesn’t support that (hello, Helix
expand my.file -t 2 > my.file.tmp && mv my.file.tmp my.file
(Updated as original version just deletes the original file.)
(Or pipe to sponge but sponge isn’t available by default.)
@aral You didn’t use sed for this?!
@omz13 I’m actually surprised expand doesn’t have the ability to change a file in place by default.