beautypg.com

How to use terminal input with command files, Command file commands, How to print a line with echo – Gasboy CFN III Mgnr's Mnl V3.4 User Manual

Page 196: Command file comm ands

background image

Making Your Own Commands

How to Use Terminal Input with Command Files

Page 180

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

How to Use Terminal Input with Command Files

To have a command in a command file print prompts and take input from the terminal, you can
use the T (terminal) option with that command in the command file. The T option disables
redirection for that command and causes the command to prompt for all input from the
terminal instead of taking input from the file. Any other output from the command will also be
printed on the terminal.

When the command with the T option ends, input is taken from the file again and redirection is
enabled. When the command file above is executed, the commands LOAD SHIFT and PRINT
TOTALS will print their normal prompts and take input from the terminal.

Command File Commands

How to Print a Line with ECHO

ECHO or EC sends its arguments to standard output. Standard output normally prints on the
command terminal, but can be redirected to a file. If you use ECHO in a command file that is
executed by cron, the output will disappear unless it is redirected to a file.

ECHO adds a new line after the line it prints by adding a carriage return after the printed line.
ECHO;A does not put a carriage return after the echoed text.

For command files that will be executed from the console, use ECHO;T to have output
displayed on the console. Without the T option, ECHO will send its output to the log printer
when executed from the console.

You can use ECHO to, for instance, display a reassuring message that the command is in the
process of working.

P* TYPE NEWSHIFT.CMD

stop
* stop halts any new transactions
* from starting until shift change
* is completed
load shift;t
print totals;at
run
* run resumes operations after stop

P*

P* NEWSHIFT

stop
load shift;t
Shift number? 1
print totals;at
Which totals? 3
- - - Shift 3 from Sun 9/19/99 9:51 PM to Mon 9/20/99 6:35 AM - - -
1

1 Regular

38

35.25

2

1 Unleaded

20

18.55

3

1 Premium

41

47.95

4

1 Diesel

33

26.91

----

------

132

128.66

run

P*

This manual is related to the following products: