xsh - XML Editing Shell
xsh [options] script_or_command xsh [options] -al script [arguments ...] xsh [options] -p commands < input.xml > output.xml xsh [options] -I input.xml -O output.xml commands xsh [options] -P file.xml commands xsh [options] -cD compiled_script.pl ...
xsh -u for usage xsh -h for help xsh --man for the manual page
XSH is an shell-like language for XPath-oriented editing, querying and
manipulation of XML and HTML files (with read-only support for DocBook
SGML). xsh
can work as an interactive shell (with full command-line
support such as history, TAB-completion, etc.) or as an off-line
interpreter for batch processing of XML files.
See XSH2 manual page or http://xsh.sourceforge.net/documentation.html for a complete XSH language reference.
For a quick help, type xsh help
(just help
on xsh prompt).
Type xsh help commands
to get list of available XSH commands and
xsh help command
with command replaced by a XSH command name
to get help on a particular command.
Run xsh help Prompt
to get information on how to setup the XSH2
shell prompt.
Load and execute given XSH script (the script is executed before all other commands provided on the command-line, but after executed ~/.xsh2rc).
Indicate, that the command-line arguments are XSH commands.
Indicate, that the command-line arguments are should be
passed to the script via @XML::XSH2::Map::ARGV
. This
option is incompatible with --commands
.
Don't display command-prompt even if run from a terminal, expecting XSH commands in the standard input.
Compile the XSH source and report errors, only. No commands are actually executed.
Compiles XSH source(s)
into a stand-alone Perl script which can
be executed simply with
perl output_filename.pl [script-arguments ... ]
The compiled Perl script still requires XML::XSH2 modules to be installed, but since it is already precompiled and also because loading of XSH grammar parser is not required, it starts almost instantly, compared to its XSH source.
Note that the compiled script includes init file (unless -f
flag
was used), and it also preserves run-time flag settings used during
the compilation.
Use -c
to suppress execution of the compiled script.
Quiet mode: suppress all unnecessary informatory ouptut.
Start with indent 1 (on) and keep_blanks 0 (off) to allow nice indenting of the XML output.
Start with validation, load_ext_dtd, parser_expands_entities and parser_completes_attributes 1 (on).
Start with validation, load_ext_dtd, parser_expands_entities and parser_completes_attributes 0 (off).
Print some debug messages.
Ignore ~/.xsh2rc
Print XSH version info and exit.
Start interactive mode with xsh command prompt. By default, the
interactive mode is only started if xsh
is running from a terminal
and neither XSH commands nor a script are given on the command-line.
Force non-interactive mode.
This is a special mode in which xsh acts as a pipe-line processing
tool. In this mode, first the standard input is read and opened as a
document _ (underscore), then all XSH commands given in ~/.xsh2rc,
command-line and given XSH scripts are applied and finally the
(possibly modified) document _ is dumped back on the standard output.
It is equivallent to -I - -O -
and -P -
.
Preload given file as a document with ID _ upon startup.
Try to saves document with ID _ into given file before XSH ends.
A convenient shortcut for -I filename -O filename
.
Make XSH expect HTML documents by default in all open/save operations.
This option is included only for completeness sake. Make XSH expect XSH documents by default in all open/save operations (this is the default).
This option allows tracing the way XSH language parser processes your script.
Set the encoding that used in the XSH scripts (or keyboard input).
Set the encoding that should be used for XSH output.
Print a brief help message on usage and exits.
Prints the help page and exits.
Displays the help as manual page.
Petr Pajas <pajas@matfyz.cz>
Copyright 2000-2003 Petr Pajas, All rights reserved.
XSH2, the XML::XSH2 manpage, the XML::XSH2::Compile manpage, the XML::LibXML manpage, the XML::XUpdate manpage, http://xsh.sourceforge.net/doc