beautypg.com

Redirecting command input and output, How to redirect input for a command, How to redirect output from a command – Gasboy CFN III Mgnr's Mnl V3.4 User Manual

Page 35

background image

MDE-4315 CFN Series CFN III Manager’s Manual for Windows NT · August 2004

Page 19

Redirecting Command Input and Output

Site Controller III

Redirecting Command Input and Output

Normally commands take their input from the keyboard and send their output to
the command terminal. You can use input and output redirection to cause
commands to take their input from a file and put their output in a file.

You can use input and output redirection together. When you combine the
redirection options with other options on the same command line, if the other
options follow the redirection options, put a comma after the filename.
For example,

PRINT PUMP;>filename,A
may also be written as
PRINT PUMP;A>filename

In any case, a blank space should always separate the command options from
the arguments or data.

How to Redirect Input for a Command

The option for input redirection is <. You can create a file with data for a
command, then execute the command with that file as input. For example, the
file MESSAGES shown below contains data for the command LOAD
MESSAGE. This example results in a moving message on the island card
reader’s display. The second column is the length of time each line is displayed.

The command LOAD MESSAGE;LOAD MESSAGE with input from the file MESSAGES.

How to Redirect Output from a Command

The options for output redirection are > and >>. These options differ in their
effect on an existing file that is to receive output. The > option overwrites the
contents of an existing file. The >> option appends data to the end of an
existing file. For example, the command PRINT TRANSACTIONS;>TRANS
puts the output of PRINT TRANSACTIONS in the file TRANS, deleting
whatever was in the TRANS file.

The command PRINT TRANSACTIONS;>>TRANS appends the output of the
command PRINT TRANSACTIONS to the file TRANS.

P* LOAD MESSAGES

1

3.00

Welcome to

2

3.00

Will’s Fast Fuel

3

3.00

Walla Walla,, WA

4

3.00

<---Slide Card <---

5

0.20

<---

6

0.20

<---

7

0.20

<---

8

0.20

<---

9

2.00

Need Oil?

10

3.00

Oil is on sale!

P*

This manual is related to the following products: