summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/shcomp.1
blob: 6c298039836bf7b01c07dfd00ffd161fdbaa12f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
'\" 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 "27 Jan 2009" "SunOS 5.11" "User Commands"
.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
.mk
.na
\fB\fB-D\fR\fR
.ad
.br
.na
\fB\fB--dictionary\fR\fR
.ad
.RS 16n
.rt  
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
.mk
.na
\fB\fB-n\fR\fR
.ad
.br
.na
\fB\fB--noexec\fR\fR
.ad
.RS 16n
.rt  
Display warning messages for obsolete or non-conforming constructs.
.RE

.sp
.ne 2
.mk
.na
\fB\fB-v\fR\fR
.ad
.br
.na
\fB\fB--verbose\fR\fR
.ad
.RS 16n
.rt  
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
.mk
.na
\fB\fIinfile\fR\fR
.ad
.RS 11n
.rt  
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
.mk
.na
\fB\fIoutfile\fR\fR
.ad
.RS 11n
.rt  
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
.mk
.na
\fB\fB0\fR\fR
.ad
.RS 6n
.rt  
Successful completion.
.RE

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

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

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
CSIEnabled
_
Interface StabilitySee 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)