NAME
webscript – web interaction scripting language

SYNOPSIS
webscript [ –vx ] [ file ... ]

DESCRIPTION
Webscript is a simple language for scripting web interactions. The language is described below.

Webscript reads and executes each file in turn. If no files are listed, webscript reads from standard input. The –x option causes webscript to print each simple command as it executes. The –v option causes webscript to print verbose debugging output.

Web scripts are sequences of commands separated by semicolons or newlines. The commands manipulate the current HTML document and the current focus within the document. The focus may be the entire document, a table, a row, a cell, a form, or a form field.

The commands are:
load url
Load the document at the given url, a quoted string. The focus is initialized to be the entire document.
find [ where ] thing ] [ text ]
Find a given XXX.
print [ text ]
If text, a quoted string, is specified, print that string. With no arguments, print a text representation of the current document focus.
input value
submit
!
command
if(command) command else command
while(command) command
{ command ... }
The # character causes the rest of the line to be treated as a comment.

SOURCE
/sys/src/cmd/webscript

SEE ALSO
hget(1), webcookies(4), webfs(4)
Copyright © 2025 Plan 9 Foundation