/etc/hosts lines starting with white space are ignored

Paul Armstrong freebsdhackers at otoh.org
Wed Feb 2 16:36:17 PST 2005


On Tue, Feb 01, 2005 at 05:21:19PM -0800, Romain Kang wrote:
> > If a line in /etc/hosts starts with a space or tab, it's not read. I'm 
> > not sure that's really a desirable behavior.  I'm quite sure it's not 
> > the vehavior I expected.
> 
> The format of /etc/hosts has been thus for more than 20 years over
> multiple platforms, so it's what everyone else expects.  Sorry.

I'm not so sure it is actually.
Both Solaris and Linux (sorry, but these are the only 2 other platforms
I've got access to), accept lines beginning with space or tab (or both).

Paul



More information about the freebsd-hackers mailing list