File varsub.icn

Summary

###########################################################################

	File:     varsub.icn

	Subject:  Procedure to perform UNIX-shell-style substitution

	Author:   Robert J. Alexander

	Date:     November 2, 1995

###########################################################################

   This file is in the public domain.

###########################################################################

  Variable values are obtained from the supplied procedure, "varProc",
  which returns the value of its variable-name argument or fails if
  there is no such variable.  "varProc" defaults to the procedure,
  "getenv".

  As with the UNIX Bourne shell and C shell, variable names are
  preceded by $.  Optionally, the variable name can additionally be
  surrounded by curly braces {}, which is usually done when necessary
  to isolate the variable name from surrounding text.

  As with the C-shell, the special symbol ~<username> is handled.
  Username can be omitted, in which case the value of the variable
  "HOME" is substituted.  If username is supplied, the /etc/passwd file
  is searched to supply the home directory of username (this action is
  obviously not portable to non-UNIX environments).

###########################################################################
Procedures:
varsub

This file is part of the (main) package.

Source code.

Details
Procedures:

varsub(s, varProc)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.