Specifying strings
You can specify a string in any of these ways:
| String | Example |
|---|---|
| Any series of characters not containing a space. This example shows a path name with no space in it. | "creat /u/wjs/file 700" |
| Any series of characters delimited by ' and not containing '. This example shows a path name with a space in it. | "creat 'u/wjs/my file' 700" |
| Any series of characters delimited by " and not containing ". This example shows a path name with a space in it. | 'creat "u/wjs/my file" 700' |
| A variable name enclosed in parentheses. Strings that contain both the single quotation mark and double quotation mark characters must be stored in a variable, and you must use the variable name. |
|
The following example uses a variable that is enclosed in parentheses to avoid problems with a
blank in the file name:
file='/u/wjs/my file'
"creat (file) 700" If you
incorrectly coded the second line as: "creat /u/wjs/my file 700" it would
contain four tokens instead of three.