ACC SHELL

Path : /usr/share/YaST2/scrconf/
File Upload :
Current File : //usr/share/YaST2/scrconf/etc_hosts.scr

/**
 * File:	etc_hosts.scr
 * Summary:	Agent for reading/writing /etc/hosts
 * Access:	read/write
 * Authors:	Michal Svec <msvec@suse.cz>
 * See:		hosts(5)
 *
 * Example:
 *   Dir(.etc.hosts)
 *   (["127.0.0.1", "::1"])
 **
 *   Read(.etc.hosts."127.0.0.1")
 *   ("localhost")
 **
 *   Write(.etc.hosts."10.20.1.29", "beholder.suse.cz beholder")
 *   (true)
 *
 * $Id: etc_hosts.scr 33494 2006-10-18 12:17:01Z kmachalkova $
 */
.etc.hosts

`ag_ini(
    `IniAgent( "/etc/hosts",
	$[
	    "options"	: [ "global_values", "repeat_names", "flat" ],
	    "comments"	: [ "^#.*", "^[ \t]*$" ],
	    "params"	: [
		$[ "match" : [ "^[ \t]*([^ \t]+)[ \t]+(.+)[ \t]*$", "%-15s %s" ] ]
	    ]
	]
))

ACC SHELL 2018