/usr/share/doc/gawk/examples/network
NameSizeModeActions
coreserv.awk33910644editdlrm
eliza.awk102200644editdlrm
fingerclient.awk1610644editdlrm
geturl.awk7870644editdlrm
hello-serv.awk4630644editdlrm
maze.awk26550644editdlrm
mobag.awk28410644editdlrm
panic.awk5750644editdlrm
PostAgent.sh2740644editdlrm
protbase.awk4000644editdlrm
protbase.request1620644editdlrm
protbase.result6420644editdlrm
remconf.awk21860644editdlrm
statist.awk36120644editdlrm
stoxdata.txt1650644editdlrm
stoxpred.awk56370644editdlrm
testserv.awk3340644editdlrm
urlchk.awk10530644editdlrm
webgrab.awk1870644editdlrm
Edit: /usr/share/doc/gawk/examples/network/remconf.awk (2186B)
function SetUpServer() { TopHeader = "Remote Configuration" TopDoc = "\

Please choose one of the following actions:

\ " TopFooter = "" if (ConfigFile == "") ConfigFile = "config.asc" } function HandleGET() { if (MENU[2] == "AboutServer") { Document = "This is a GUI for remote configuration of an\ embedded system. It is is implemented as one GAWK script." } else if (MENU[2] == "ReadConfig") { RS = "\n" while ((getline < ConfigFile) > 0) config[$1] = $2; close(ConfigFile) RS = "\r\n" Document = "Configuration has been read." } else if (MENU[2] == "CheckConfig") { Document = "" for (i in config) Document = Document "" \ "" Document = Document "
" i "" config[i] "
" } else if (MENU[2] == "ChangeConfig") { if ("Param" in GETARG) { # any parameter to set? if (GETARG["Param"] in config) { # is parameter valid? config[GETARG["Param"]] = GETARG["Value"] Document = (GETARG["Param"] " = " GETARG["Value"] ".") } else { Document = "Parameter " GETARG["Param"] " is invalid." } } else { Document = "

Change one parameter

\ \ \ \ \
ParameterValue
" } } else if (MENU[2] == "SaveConfig") { for (i in config) printf("%s %s\n", i, config[i]) > ConfigFile close(ConfigFile) Document = "Configuration has been saved." } }