script_save
Abstract
Saves history commands to a script file.
Syntax
script_save <filename> [all]
| Argument | Type | Description |
|---|---|---|
<filename> |
string | Name of the script file in which to save commands. This argument should not include the .scr suffix, which is automatically appended. |
all |
n/a | Save all commands in the history file. |
Details
Saves (in a script file) all commands entered since the script_start command. To save all commands in the history file (all commands entered since the beginning of the ODB session), add the all argument. (Script commands in the history file are not saved.)
Example
ODB> script_start
ODB> memstats 20
[memory statistics are displayed]
ODB> pktrace 100
Added trace #0: trace on packet with ID (100) (packet not in system)
ODB> pktrace 200
Added trace #1: trace on packet with ID (200) (packet not in system)
ODB> pktrace 50
Added trace #2: trace on packet with ID (50) (packet not in system)
ODB> evstop +500
Added breakpoint #0: stop at nth event (500)
ODB> cont
____________________________ (ODB 18.6.0: Event) ____________________________
* Time : 14.0 sec, [14s]
* Event : execution ID (499), schedule ID (#514), type (remote (start reception))
* Source : execution ID (491), top.pksw1.node_0.xmt [Objid=101] (pt-pt transmitter)
* Data : code (0)
> Module : top.pksw1.hub.rcv3 [Objid=31] (pt-pt receiver)
breakpoint #0 trapped : "stop at nth event (500)"
ODB> script_save pksw
Script "pksw" generated, with 6 commands.
ODB> script_view pksw
0: memstats 20
1: pktrace 100
2: pktrace 200
3: pktrace 50
4: evstop +500
5: cont
ODB> script_save new
"script_save pksw" is a script command. Though it is in the history buffer, it will not be saved to the script file.
"script_view pksw" is a script command. Though it is in the history buffer, it will not be saved to the script file.
Script "new" generated, with 6 commands.