sh-sexprs man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

SH-SEXPRS(1)							  SH-SEXPRS(1)

NAME
       sexprs,	islist, els, text, textels, mktext, mklist, mktextlist - parse
       and generate S-expressions

SYNOPSIS
       load sexprs

       getsexprs command
       islist sexpr
       ${els sexpr}
       ${text sexpr}
       ${textels sexpr}
       ${mktext val}
       ${mklist [ val...  ]}
       ${mktextlist [ val...  ]}

DESCRIPTION
       Sexprs is a loadable module for sh(1) that  provides  the  facility  to
       parse and generate S-expressions (see sexprs(2)).  The following primi‐
       tives are provided:

       getsexprs Getsexprs works similiarly  to	 getlines  in  sh-std(1).   It
		 reads	S-expressions from the standard input, and for expres‐
		 sion read, it invokes command with $sexp set to the text rep‐
		 resentation  of  that	expression.   Getsexprs recognises the
		 usual loop break and continue exceptions.

       islist sexp
		 Islist yields a nil (true) status if sexp, which  must	 be  a
		 well-formed S-expression, is a list element.

       ${els sexp}
		 If  sexp  is  an  S-expression	 containing  a	list, then els
		 returns a list of the S-expressions it contains.   It	is  an
		 error if sexp is not a valid S-expression.

       ${text sexp}
		 If  sexp is an S-expression containing a simple element, then
		 text returns the value of that element. If sexp  is  a	 list,
		 the return value will be an empty string.  Note that elements
		 containing binary data will likely be corrupted by conversion
		 to  utf-8.   It  is an error if sexp is not a valid S-expres‐
		 sion.

       ${textels sexp}
		 If sexp is an S-expression containing a  list,	 then  textels
		 returns  a list of the text values in that S-expression, con‐
		 verted as with ${text}.  It is an error  if  sexp  is	not  a
		 valid S-expression.

       ${mktext val}
		 Mktext returns a text representation of the S-expression con‐
		 taining the simple value val.

       ${mklist [sexp...]}
		 Mklist returns a text representation of the S-expression list
		 containing its arguments, which must be well-format S-expres‐
		 sions.

       ${mktextlist [val...]}
		 Mktextlist returns a text representation of the  S-expression
		 list containing one simple element for each val.

SOURCE
       /appl/cmd/sh/sexprs.b

SEE ALSO
       sh(1), sh-std(1), sexprs(2)

								  SH-SEXPRS(1)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net