8.4 String Substitution
8.4 String Substitution
Most command shells provide some form of string substitution so as to
provide some degree of parameterization. The FunnelWeb shell provides
Tutorial
36 different string variables named $0..$9 and $A..$Z (case insensitive).
Each variable can hold a string containing any sequence of printable
Developer
characters and can be as long as a command line.
The define command allows the user to assign a value to these variables.
Reference
The define command takes two arguments. The first is the digit or letter of
1 Introduction
the variable to be defined. The second is a double quote delimited string
2 Interface
being the string value to be assigned to the variable. If you want to include
3 Scanner
a double quote character within the string, you don t need to double it.
4 Parser
Examples:
5 Analyser
6 Tangle
define 3 "/root/usr/dave/workdir/fwdir/testdir"
7 Weave
define M "/user/local/rubbish/bin/fw"
8 Shell
define Q "You don t need to double" double quotes"
9 Commands
Only the identifying character of the variable being assigned is used in the
10 Glossary
definition. This syntax is a simple way of preventing the variable from
11 References
being substituted before it has a chance to be defined!
SEARCH
The following points clean up the remaining semantic details:
There is only one set of variables and they are global to all
G   
shellscripts. There are 
no local variables
 .
When a shellscript is invoked using the execute command, the
G   
substitution variables 0 through 9 are affected. See the EXECUTE
command for more details.
If you want to include a dollar sign character in a command use
G   
"
$$
".
FunnelWeb also defines "
G   
$/
" which translates to the character that
separates directory and file name fields in file names on the host
machine. For example: Sun="
/
", Vax="
]
", Mac="
:
", PC="
\
".
Substitution is not performed recursively.
G   
Webmaster
    
Copyright   Ross N. Williams 1992,1999. All rights reserved.
http://www.ross.net/funnelweb/reference/shell_strsubs.html [3/3/2000 10:46:08 PM]





Actions web hosting footer




 

 

 

 

Home | About Us | Network | Compare Plans | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

Terms Of Service

j2ee web hosting

 

Our web partners: Web Hosting PHP Jsp Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting  Java Web Hosting

Cheap Web Hosting Java Hosting Cheapest Hosting Quality Web Templates Best Web Templates Web Design Templates

Java Web Hosting Cheap Hosting Cheap Web Hosting Jsp Web Hosting Tomcat Web Hosting

Quality Web Hosting Best Web Hosting Java Web Hosting

Actionswebhosting.com Business web hosting division of Vision Web Hosting Inc. All rights reserved.