======Commands====== The following commands come with xmlsh. As a naming convention, commands that start with "x" operate intrinsically on xml data (either as input or output and usually both). Commands not starting with "x" generally don't operate on xml data exclusively (either as input or output). Commands where Streaming is "Yes" are fully streamable in the sense that a fixed amount of memory is used regardless of the input size, and output can appear before the input has been completely read. Note this is independent from the capability of [[XDMStreaming XDM Streaming]]. Note: if your xmlsh scripts include only commands from this list they will be portable across all OS's which support xmlsh and have no dependency on OS commands. |=|Command|=|Set|=|Streaming|=|Description|| ||[[CommandColon : ]]||Core||||The null command ":"|| ||""[""||Core||||Evaluates expressions|| ||[[CommandBase64 base64]]||[[CommandsPosix Posix]]||Yes||""Base64"" encode/decode|| ||[[CommandBreak break]]||Core||||Exits one level of a loop|| ||[[CommandCat cat]]||[[CommandsPosix Posix]]||Yes||copy or concatenate files|| ||[[CommandCd cd]]||Core||||change or print current directory|| ||[[CommandChmod chmod]]||[[CommandsPosix Posix]]||||Change file permissions|| ||[[CommandCp cp]]||[[CommandsPosix Posix]]||Yes||copy one or more files|| ||[[CommandContinue continue]]||Core||||Continues the iteration of one level of a loop|| ||[[CommandCsv2xml csv2xml]]||Core||Yes||convert csv file to xml|| ||[[CommandDeclare declare]]||Core||||Declarations (including namespaces)|| ||[[CommandEcho echo]]||Core||||Prints arguments as text|| ||[[CommandEval eval]]||Core||||Evaluate a shell command|| ||[[CommandExit exit]]||Core||||exit the shell, script, or function|| ||[[CommandFalse false]]||Core||||returns false|| ||[[CommandFixed2xml fixed2xml]]||Core||Yes||convert fixed field files to xml|| ||[[CommandXgzip xgzip]]||Core||Yes||gzip|| ||[[CommandXgunzip xgunzip]]||Core||Yes||gunzip|| ||[[CommandHelp help]]||Core||||Help on commands|| ||[[CommandHttp http]]||Core||||Http client command|| ||[[CommandHttpserver httpserver]]||Core||||Http server|| ||[[CommandHttpsession httpsession]]||Core||||Get and set HTTP session variables|| ||[[CommandImport import]]||Core||||Import modules, packages and commands|| ||[[CommandJCall jcall]]||[[JavaObjects Java]]||||call java from within the same JVM|| ||[[CommandJset jset]]||[[JavaObjects Java]]||||Set a variable by calling a java method|| ||[[CommandJson2xml json2xml]]||JSON||Convert JSON to XML|| ||[[CommandJsonCat jsoncat]]||JSON||||Concatenate json objects into an array|| ||[[CommandJsonpath jsonpath]]||JSON||||Evaluate a JsonPath expression|| ||[[CommandJsonread jsonread]]||JSON||||Read JSON into a variable|| ||[[CommandJobs jobs]]||Core||||prints jobs|| ||[[CommandLog log]]||Core||||Writes to log4j log|| ||[[CommandLs ls]]||[[CommandsPosix Posix]]||||list files in a directory|| ||[[CommandMkdir mkdir]]||[[CommandsPosix Posix]]||||Create directories|| ||[[CommandMktemp mktemp]]||[[CommandsPosix Posix]]||||Create a temporary file or directory|| ||[[CommandMore more]]||[[CommandsPosix Posix]]||Yes||Simple pagenator|| ||[[CommandMv mv]]||[[CommandsPosix Posix]]||||Move/Rename files|| ||[[CommandPrintvar printvar]]||Core||Yes||Prints one or more variables|| ||[[CommandPwd pwd]]||[[CommandsPosix Posix]]||||print current working directory|| ||[[CommandRead read]]||Core||||reads text into a variable|| ||[[CommandReturn return]]||Core||||Returns from a function|| ||[[CommandRequire require]]||Core||||Checks the current shell for a specified minimum version|| ||[[CommandRm rm]]||[[CommandsPosix Posix]]||||Remove/Delete files|| ||[[CommandRmdir rmdir]]||[[CommandsPosix Posix]]||||Remove/Delete directories|| ||[[CommandRngconvert rngconvert]]||Core||||Converts to and from RNG schema formats|| ||[[CommandRngvalidate rngvalidate]]||Core||||Validates with an RNG schema|| ||[[CommandSchematron schematron]]||Core||||Validates with a schematron description|| ||[[CommandSet set]]||Core||||set positional parameters and view variables|| ||[[CommandShift shift]]||Core||||shift positional parameters|| ||[[CommandSleep sleep]]||[[CommandsPosix Posix]]||||Delay execution|| ||[[CommandSource source (.)]]||Core||||Executes a script within the current shell|| ||[[CommandTee tee]]||[[CommandsPosix Posix]]||Yes|||Read from standard input and write to standard output and files|| ||[[CommandTest test]]||Core||||Evaluates conditional expressions (strings, files, numbers)|| ||[[CommandTouch touch]]||[[CommandsPosix Posix]]||||create and update timestamp of a file|| ||[[CommandTie tie]]||Core||||Ties an xquery to a variable for ease of access|| ||[[CommandTrue true]]||Core||||returns true|| ||[[CommandUnset unset]]||Core||||Unset a variable|| ||[[CommandWait wait]]||Core||||wait for jobs to complete|| ||[[CommandXaddattribute xaddattributre]]||Core||||Adds or replaces an attribute to nodes matching an expression|| ||[[CommandXaddbase xaddbase]]||Core||||Add xml:base attributes to a document|| ||[[CommandXbase xbase]]||Core||||extract the base URI from a document or node|| ||[[CommandXcat xcat]]||Core||Yes||concatenate XML documents|| ||[[CommandXcmp xcmp]]||Core||Yes||compare text, binary or xml|| ||[[CommandXdelattribute xdelattribute]]||Core||Yes||delete attributes|| ||[[CommandXdelete xdelete]]||Core||||Deletes nodes or attributes matching an expression|| ||[[CommandXEcho xecho]]||Core||||Prints arguments as xml|| ||[[CommandXed xed]]||Core||||xpath based xml edit|| ||[[CommandXevent xevent]]||Test||Yes||generate or receive ""StAX"" Events|| ||[[CommandXfile xfile]]||Core||||file name manipulations|| ||[[CommandXgetopts xgetopts]]||Core||||parse arguments into xml|| ||[[CommandXgrep xgrep]]||Core||||Search for patterns in files|| ||[[CommandXidentity xidentity]]||Core||Yes||Outputs an identical copy of the input|| ||[[CommandXinclude xinclude]]||Core||||runs xinclude preprocessing on an xml file|| ||[[CommandXls xls]]||Core||||list files in a directory|| ||[[CommandXmd5sum xmd5sum]]||Core||Yes||MD5 sum of file(s)|| ||[[CommandXmkpipe xmkpipe]]||Core||||Creates a named pipe|| ||[[CommandXml2csv xml2csv]]||Core||||convert xml to csv|| ||[[CommandXml2json xml2json]]||Core||||Convert XML to JSON|| ||[[CommandXmove xmove]]||Core||||Rename/Move xml files to a new filename based on an expression in the file|| ||[[CommandXpath xpath]]||Core||||run xpath version 2.0 expressions on an xml document|| ||[[CommandXmlsh xmlsh]]||Core||||Run a sub shell|| ||[[CommandXmlshui xmlshui]]||Core||||Run the simple xmlsh GUI|| ||[[CommandXpwd xpwd]]||Core||||prints the current directory|| ||[[CommandXProperties xproperties]]||Core||||parse or generate Java Properties files|| ||[[CommandXquery xquery]]||Core||||runs xquery scripts on an xml document|| ||[[CommandXquote xquote]]||Core||||Converts an XML expression into a String|| ||[[CommandXRead xread]]||Core||||Reads an XML document into a variable|| ||[[CommandXsdvalidate xsdvalidate]]||Core||||Validates against one or more W3C XSD schemas|| ||[[CommandXsql xsql]]||Core||||query a relational database using jdbc|| ||[[CommandXslt xslt]]||Core||||runs xslt version 2.0 transformations|| ||[[CommandXslt1 xslt1]]||Core||||runs xslt version 1.0 transformations|| ||[[CommandXsplit xsplit]]||Core||Yes||splits an XML file into multiple files|| ||[[CommandXsysinfo xsysinfo]]||[[CommandsExperimental Experimental]]||||prints system information|| ||[[CommandXtee xtee]]||Core||Yes||copies input to multiple outputs|| ||[[CommandXtype xtype]]||Core||||prints the XDM type of each argument|| ||[[CommandXuri xuri]]||Core||||create and disect URI's|| ||[[CommandXurldecode xurldecode]]||Core||||Decode arguments (or stdin) from urlencoded to text|| ||[[CommandXurlencode xurlencode]]||Core||||Encode arguments (or stdin) from text to urlencoded|| ||[[CommandXunquote xunquote]]||Core||||Converts (parses) a string into an XML expression|| ||[[CommandsXunzip xunzip]]||Core||Yes||Extracts zip archives|| ||[[CommandsXwc xwc]]||Core||Yes||counts XML nodes (all XDM types)|| ||[[CommandXvalidate xvalidate]]||Core||||validate a document against a schema|| ||[[CommandXversion xversion]]||Core||||prints the shell version || ||[[CommandWc wc]]||[[CommandsPosix Posix]]||yes||Counts lines, words, and characters|| ||[[CommandXWhich xwhich]]||Core||||Locates commands|| ||[[CommandsXzip xzip]]||Core||Yes||Creates zip archives|| ---- See Also [[Functions Functions]]