'\" te
.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc.
.TH SHCOMP 1 "Jan 27, 2009"
.SH NAME
shcomp \- compile a ksh93 shell script
.SH SYNOPSIS
.LP
.nf
\fBshcomp\fR [\fB-nv\fR] [\fIinfile\fR [\fIoutfile\fR]]
.fi

.LP
.nf
\fBshcomp\fR \fB-D\fR [\fIinfile\fR [\fIoutfile\fR]]
.fi

.SH DESCRIPTION
.sp
.LP
If the \fB-D\fR option is not specified, \fBshcomp\fR takes a shell script,
\fIinfile\fR, and creates a binary format file, \fIoutfile\fR, that \fBksh93\fR
reads and executes with the same effect as the original script.
.sp
.LP
Aliases are processed as the script is read. Alias definitions whose value
requires variable expansion will not work correctly.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-D\fR\fR
.ad
.br
.na
\fB\fB--dictionary\fR\fR
.ad
.RS 16n
Generate a list of strings that need to be placed in a message catalog for
internationalization.
.sp
With this option, all double quoted strings that are preceded by \fB$\fR are
printed, one literal per line. A literal \fB$"foo"\fR prints \fB"foo"\fR in the
output. These are the messages that need to be translated to locale specific
versions for internationalization.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.br
.na
\fB\fB--noexec\fR\fR
.ad
.RS 16n
Display warning messages for obsolete or non-conforming constructs.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.br
.na
\fB\fB--verbose\fR\fR
.ad
.RS 16n
Display input from \fIinfile\fR onto standard error as it reads it.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIinfile\fR\fR
.ad
.RS 11n
Specifies the name of the file that contains the shell script to be used as
input.
.sp
If \fIinfile\fR is omitted, the shell script is read from standard input.
.RE

.sp
.ne 2
.na
\fB\fIoutfile\fR\fR
.ad
.RS 11n
Specifies the name of the output file.
.sp
If \fIoutfile\fR is omitted, both modes write their results to standard output.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	See below.
.TE

.sp
.LP
The command-line interface and the system variables are Committed. The compiled
shell code format is Private. The output of the \fB-D\fR option is Volatile.
.SH SEE ALSO
.sp
.LP
\fBksh93\fR(1), \fBattributes\fR(5)