3 ms·
The shell performs field splitting according to the characters in the IFS environment variable; if unset it splits on <space>, <tab>, and <newline>. There are
by wahern 7y ago
The shell performs field splitting according to the characters in the IFS environment variable; if unset it splits on <space>, <tab>, and <newline>.
There are many other places in Unix where tabs are special. The "<<-" heredoc operator will strip leading <tab> characters, so if you want to nest embedded content neatly in your script you have to use tabs. Similarly, programs like cut(1) default to using <tab> as the delimiter.
The fact of the matter is that until very recently the vast majority of programs and programmers on Unix used tab indentation, and to a lesser extent tabs for intra-line alignment. So while the requirement of leading tabs in Make may have been a mistake, it was a benign mistake that would have gone mostly unnoticed. And the alternative surely would been a more permissive syntax allowing both <tab> and <space>.