# Running Op Script from operational mode
awa@JUNOS> show configuration system scripts
op {
file hello.slax;
file show.slax;
}
{master:0}
awa@JUNOS> file list /var/db/scripts/op
/var/db/scripts/op:
hello.slax
show.slax*
{master:0}
awa@JUNOS> file show /var/db/scripts/op/hello.slax
version 1.0;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
match / {
}
}
{master:0}
awa@JUNOS> op hello
Hello World
{master:0}
awa@JUNOS>
# Running Op Script from start shell
*not all op script can running from start shell
awa@JUNOS> start shell
% cd /var/db/scripts/op
% ls -l
total 16
-rw-r--r— 1 awa wheel 275 Jan 9 17:02 hello.slax
-rwxrws--- 1 awa wheel 442 Jan 8 16:29 show.slax
% cat hello.slax
version 1.0;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
match / {
}
}
% cli op hello
Hello World
%