There are several ways to invoke the interactive NCL utility:
1. Enter ncl at the shell prompt. The NCL prompt appears:
% ncl <Return>
ncl>
2. Enter an NCL command line.
% ncl any ncl command <Return>
After the command executes, you return to the shell.
3. Redirect a command script into NCL.
% ncl <scripta
where scripta is the name of a script that contains a sequence
of NCL commands.
4. Execute a shell script containing NCL commands. Your shell
script can use the exit status returned by NCL commands.
% ncl_filename
The following C shell script demonstrates this:
#!/bin/csh
ncl show routing circuit circuit-1 all attributes
if ( $status != 0 ) then
echo ""
echo "This ncl command failed."
echo ""
endif
This sample script uses the exit status from an NCL command
to determine whether or not to echo a message. If the command
fails, the shell script echoes the message.
Other NCL operations include:
o To abort an NCL operation, press <Ctrl/C> at the ncl> prompt.
o To continue a long command to the next line, use a hyphen as
the last character in the line. The _ncl> prompt is displayed
on continuation lines:
ncl> set node moosie routing manual network entity titles -
_ncl> { 49::00-0c:08-00-2b-12-34-56:00, -
_ncl> 49::00-0c:08-00-2b-12-34-57:00 }
o To include comments in NCL shell scripts or as part of a
command line in the interactive utility, use the exclamation
point (!) or pound sign (#) character. NCL ignores hyphens
within and at the end of a comment line.
o To exit from NCL, enter exit, quit, or press <Ctrl/D> at the ncl>
prompt.