SHCOMP(1) General Commands Manual SHCOMP(1)

# [NAME](#NAME)

shcomp - compile a shell script

# [SYNOPSIS](#SYNOPSIS)

**shcomp** \[ *options* ] \[infile \[outfile]]

# [DESCRIPTION](#DESCRIPTION)

Unless **-D** is specified, **shcomp** takes a shell script, *infile*, and creates a binary format file, *outfile*, that **ksh** can read and execute with the same effect as the original script.

Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly.

If **-D** is specified, all double quoted strings that are preceded by **$** are output. These are the messages that need to be translated to locale specific versions for internationalization.

If *infile* is a simple command name, the shell script will be searched on **$PATH**. It does not need execute permission to be found.

If *outfile* is omitted, then the results will be written to standard output. If *infile* is also omitted, the shell script will be read from standard input. However, **shcomp** will not read a script from your keyboard unless *infile* is given as **/dev/stdin**, and will refuse to write binary data to a terminal in any case.

# [OPTIONS](#OPTIONS)

**-D**, **--dictionary**  
Generate a list of strings that need to be placed in a message catalog for internationalization.

**-n**, **--noexec**  
Displays warning messages for obsolete or non-conforming constructs.

**-v**, **--verbose**  
Displays input from *infile* onto standard error as it reads it.

# [EXIT STATUS](#EXIT)

**0**  
Successful completion.  
**&gt;0**  
An error occurred.

# [SEE ALSO](#SEE)

[**ksh**(1)](/man/os/ksh/ksh.1)

# [IMPLEMENTATION](#IMPLEMENTATION)

**version**  
shcomp (AT&T Research) 93u+m/1.0.10+f0999ab7 2024-08-01  
**author**  
David Korn &lt;dgk@research.att.com&gt;  
**copyright**  
(c) 1982-2012 AT&T Intellectual Property  
**copyright**  
(c) 2020-2024 Contributors to ksh 93u+m  
**license**  
https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html

---

Document: shcomp(1) from ksh 1.0.10-r36 (Chainguard OS)
Source: https://github.com/ksh93/ksh
