Previous Next Chapter

S: Directory

The S: directory is generally reserved for AmigaDOS and ARexx scripts. However, you may place non-script files in S: or place script files in other directories. In addition to the Startup-sequence file, the User-startup file that you create, and Shell-startup files, the S: directory also contains teh scripts described in this section.

ED-Startup

This file contains ED commands used to configure the ED text editor, assigning the default function key options. Key assignments can be customized by editing this file. Removing or renaming this file activates expanded ED command menus; see Chapter 4 for instructions on how to do this.

Other files containing ED commands can be stored in S: for use by the WITH keyword of ED, which allows ED command files to perform custom editing operations.

SPat, DPat

These scripts allow pattern matching with commands that do not normally support it. When run with a command, SPat and DPat use the LIST command to create temporary script files in the T: directory and then execute the scripts. SPat and DPat can be used within command aliases.

SPat adds pattern matching to single-argument commands. For example, to use ED to edit all the files in the S: directory beginning with the letter's, enter:

1> SPat ED S:s#?

A script similiar to the following is generated:

ED "s:Shell-startup"
ED "s:SPat"
ED "s:Startup-sequence"

SPat executes the script, invoking ED three times to display the files.

DPat adds pattern matching to double-argument commands. After DPat and the command name, enter the two arguments separated by a space, using the wildcards required to produce the desired matches.

PCD

Like the CD command, the PCD script changes the current directory. However, PCD also remembers the directory from which you are changing, so you can return to it without entering the entire path. Each Shell has an independent PCD memory.

The first time you use PCD in a given Shell, you must give it the path to a directory. When entered with this path argument, PCD has the same effect as CD, changing to the named directory, but it also stores the path to the directory from which you changed. You can then change the current directory by the usual methods. To return to the initial directory, enter PCD alone. For example:

1.System:> PCD Work:Paint/24bit
1.Work:Paint/24bit> PCD
1.System:>

Subsequent invocations of PCD switch to the directory in which you last used PCD:

1.System:> PCD
1.Work:Paint/24bit> /
1.Work:Paint> PCD
1.System:>

PCD use the assign list to store the remembered directory. When you use PCD, the list contains the assignment from<n> , where <n> is the Shell number. Using PCD with no argument before establishing the first from directory produces an error requester.

For further examples of PCD, see Chapter 8.

Top Previous Next Chapter