[TriLUG] Syntax checker for /etc/hosts ?

Scott Lambdin lopaki at gmail.com
Fri Oct 25 17:33:15 EDT 2013


The visiting Puppet trainer mentioned a spiffy utility for editing config
files.   http://augeas.net/

Might not be worth the effort in this case.

--Scott


On Fri, Oct 25, 2013 at 1:28 PM, Kevin Hunter Kesling
<hunteke at earlham.edu>wrote:

> On 10/24/2013 04:58 PM, Jeremy Portzer wrote:
>
>> Is there any standard command to check the syntax and "sanity" in
>> /etc/hosts?
>>
>
>  While I could write a short script easily enough to do this, I
>> thought it might be a common problem and there may be some other
>> standard way to check it.
>>
>
> Not of which I'm aware, but a sysadmin colleague from a former job used a
> script he created for the purpose of helping out those less skilled in the
> ways of Vi.  I think this is an old draft, but it gets the job done.
>
> This list doesn't do attachments, so I've pasted it to pastebin:
>
>     http://pastebin.com/qyrq7RUT
>
> He was (is?) a bit of a whitespace nazi, but he was also a damn good
> sysadmin.
>
> It's GPL, so edit it for your needs, if you like.
>
> Cheers,
>
> Kevin
>
> --
> This message was sent to: Scott Lambdin <lopaki at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/**listinfo/trilug<http://www.trilug.org/mailman/listinfo/trilug>
> Unsubscribe or edit options on the web  : http://www.trilug.org/mailman/**
> options/trilug/lopaki%40gmail.**com<http://www.trilug.org/mailman/options/trilug/lopaki%40gmail.com>
> Welcome to TriLUG: http://trilug.org/welcome
>


More information about the TriLUG mailing list