Installation guide
The DIGITAL UNIX shell contains a built-in echo command.
References to the echo command in a shell script that you run on a
DIGITAL UNIX system invoke the built-in echo command. The
ULTRIX Bourne shell contains no built-in echo command. References
to the echo command in your ULTRIX shell script invoke the
/bin/echo command.
The DIGITAL UNIX built-in echo command differs from the
/bin/echo command. For example, the built-in echo command does
not support the −n option. If you use the echo −n command in a shell
script, the output from the command includes the −n, as shown:
% echo -n hello
-n hello
Modify your shell script so that it invokes the /bin/echo command, as
shown in the following example:
/bin/echo -n hello
(See the information about the sh shell in Appendix A for more
differences between the /bin/echo command and the built-in echo
command.)
The /bin/echo command is the same on ULTRIX and DIGITAL UNIX
systems.
3.2.5 Migrating sh5 Shell Scripts
The first two bytes of an executable program, called a magic number, tell
the system what kind of program it is. The first line of most shell scripts is
a magic number consisting of the combination of a number sign and an
exclamation point (#!). This magic number tells the system to execute the
rest of the line as if it were a normal shell command. Most shell scripts
invoke the shell for which they are written to ensure that the script is
executed by the appropriate shell. The first line of most scripts written for
the ULTRIX sh5 shell is:
#! /bin/sh5
Because the DIGITAL UNIX system uses a different name for the Bourne
shell, these scripts fail. You must modify the first line to invoke the sh
shell on a DIGITAL UNIX system, as shown:
#! /bin/sh
If a script must run when the system is in single-user mode, specify
/sbin/sh instead of /bin/sh to get the statically linked version of the
shell.
3–6 Migrating Your ULTRIX User Environment to a DIGITAL UNIX System