xref: /original-bsd/old/sh/sh.1 (revision 4d1ce0b0)
1.\" Copyright (c) 1990 Regents of the University of California.
2.\" All rights reserved.  The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\"     @(#)sh.1	6.7 (Berkeley) 02/05/91
6.\"
7.Dd
8.Dt SH 1
9.Os ATT 7th
10.Sh NAME
11.Nm sh
12.Nd shell command interpreter
13.Sh SYNOPSIS
14.Nm sh
15.Op Fl ceiknrstuvx
16.Op arg
17.Ar ...
18.Sh DESCRIPTION
19.Nm Sh
20is a command programming language that executes commands read from a terminal
21or a file. The shell this page describes is called the
22.Em Bourne
23shell.
24.Pp
25Command line options:
26.Pp
27If the first character of argument 0 is
28.Fl \& ,
29commands are read from
30.Pa $HOME/.profile ,
31if such a file exists.
32The following flags are interpreted by the shell when it is invoked.
33.Tw Fl
34.Tp Cx Fl c
35.Cx \&\ \&
36.Ar string
37.Cx
38Commands are read from
39.Ar string.
40.Tp Fl s
41If the
42.Fl s
43flag is present or if no arguments remain
44then commands are read from the standard input.
45Shell output is written to file descriptor 2.
46.Tp Fl i
47If the
48.Fl i
49flag is present or
50if the shell input and output are attached to a terminal (as told by
51.Xr getty  )
52then this shell is
53.Em interactive .
54In this case the terminate signal SIGTERM (see
55.Xr sigvec  2  )
56is ignored (so that 'kill 0'
57does not kill an interactive shell) and the interrupt signal
58SIGINT is caught and ignored (so that
59.Xr wait
60is interruptible).
61In all cases SIGQUIT is ignored by the shell.
62.Tp
63.Pp
64This next set of options can be used on the command line invoking
65the
66.Nm sh
67or set with the interactive command
68.Ic set .
69.Tp Fl e
70If non interactive, exit immediately if a command fails.
71.Tp Fl k
72All keyword arguments are placed in the environment for a command,
73not just those that precede the command name.
74.Tp Fl n
75Read commands but do not execute them.
76.Tp Fl t
77Exit after reading and executing one command.
78.Tp Fl u
79Treat unset variables as an error when substituting.
80.Tp Fl v
81Print shell input lines as they are read.
82.Tp Fl x
83Print commands and their arguments as they are executed.
84.Tp Fl
85Turn off the
86.Fl x
87and
88.Fl v
89options.
90.Tp
91.Ss Commands .
92A
93.Em simple-command
94is a sequence of non blank
95.Em words
96separated by blanks (a blank is a
97.Em tab
98or a
99.Em space  ) .
100The first word specifies the name of the command to be executed.
101Except as specified below the remaining words are passed as arguments
102to the invoked command.
103The command name is passed as argument 0 (see
104.Xr execve  2  ) .
105The
106.Em value
107of a simple-command is its exit status
108if it terminates normally or
109.Cx Li 200+
110.Em status
111.Cx
112if it terminates abnormally (see
113.Ar sigvec  2
114for a list of status values).
115.Pp
116A
117.Em pipeline
118is a sequence of one or more
119.Em commands
120separated by
121.Sq Nm \&|  .
122The standard output of each command but the last is connected by a
123.Xr pipe  2
124to the standard input of the next command.
125Each command is run as a separate process;
126the shell waits for the last command to terminate.
127.Pp
128A
129.Em list
130is a sequence of one or more
131.Em pipelines
132separated by
133.Nm \&; ,
134.Nm \&& ,
135.Nm \&&&
136or
137.Nm \&|
138or
139.Nm \&|\&|
140and optionally terminated by
141.Nm \&;
142or
143.Nm \&& .
144.Nm \&;
145and
146.Nm \&&
147have equal precedence which is lower than that of
148.Nm \&&&
149and
150.Nm \&|\&| ,
151.Nm &&
152and
153.Nm \&|\&| ,
154also have equal precedence.
155A semicolon causes sequential execution; an ampersand causes the preceding
156.Em pipeline
157to be executed without waiting for it to finish.  The symbol
158.Nm \&&&
159.Pq Nm \&|\&|
160causes the
161.Em list
162following to be executed only if the preceding
163.Em pipeline
164returns a zero (non zero) value.  Newlines may appear in a
165.Em list ,
166instead of semicolons, to delimit commands.
167.Pp
168A
169.Em command
170is either a simple-command or one of the following.
171The value returned by a command is that of the
172last simple-command executed in the command.
173.Tw Fl
174.Tp Cx Ic for
175.Cx \&\ \&
176.Ar name
177.Cx \&\ \&
178.Op Ic in Ar word ...
179.Cx \&\ \&
180.Ic do
181.Cx \&\ \&
182.Ar list
183.Cx \&\ \&
184.Ic  done
185.Cx
186Each time a
187.Ic for
188command is executed
189.Ar name
190is set to the next word in the
191.Ic for
192word list.
193If
194.Ic in
195.Ar word \&...
196is omitted,
197.Ic in
198.Dq Ic \&$@
199is assumed.  Execution ends when there are no more words in the list.
200.Tp Cx Ic case
201.Cx \&\ \&
202.Ar word
203.Cx \&\ \&
204.Ic in
205.Cx \&\ \&[
206.Ar pattern
207.Cx \&\ \&
208.Op Ar \&| pattern ...
209.Cx \&\ \&
210.Ic \&)
211.Cx \&\ \&
212.Ar list
213.Cx \&\ \&
214.Ic \&;;
215.Cx \&]\ \& ...
216.Ar esac
217.Cx
218A
219.Ic case
220command executes the
221.Ar list
222associated with the first pattern that matches
223.Ar word .
224The form of the patterns is the same as that used for file name generation.
225.Tp Cx Ic if
226.Cx \&\ \&
227.Ar list
228.Cx \&\ \&
229.Ic then
230.Cx \&\ \&
231.Ar list
232.Cx \&\ \&
233.Op Ic elif Ar list Ic then Ar list
234.Cx \&\ \&
235.Cx \&...
236.Cx \&\ \&
237.Op Ic else Ar list
238.Cx \&\ \&
239.Ic fi
240.Cx
241The
242.Ar list
243following
244.Ic if
245is executed and if it returns zero the
246.Ar list
247following
248.Ic then
249is executed.  Otherwise, the
250.Ar list
251following
252.Ic elif
253is executed and if its value is zero the
254.Ar list
255following
256.Ic then
257is executed.  Failing that the
258.Ic else
259.Ar list
260is executed.
261.Tp Cx Ic  while
262.Cx \&\ \&
263.Ar list
264.Cx \&\ \&
265.Op Ic  do Ar list
266.Cx \&\ \&
267.Ic  done
268.Cx
269A
270.Ic while
271command repeatedly executes the
272.Ic  while
273.Ar list
274and if its value is zero executes the
275.Ic do
276.Ar list ;
277otherwise the loop terminates.  The value returned by a
278.Ic while
279command is that of the last executed command in the
280.Ic do
281.Ar list .
282.Ic until
283may be used in place of
284.Ic while
285to negate the loop termination test.
286.Tp Pq Ar list
287Execute
288.Ar list
289in a subshell.
290.Tp Cx \&{
291.Ar list
292.Cx \&}
293.Cx
294.Ar list
295is simply executed.
296.Tp
297.Pp
298The following words are only recognized as the first word of a command
299and when not quoted.
300.Df I
301.Nm if then else elif fi case in esac
302.Nm for while until do done \&{ \&}
303.De
304.Pp
305.Ss Command substitution
306The standard output from a command enclosed in a pair of back quotes
307.Pq Ic \&``
308may be used as part or all of a word; trailing newlines are removed.
309.Pp
310.Ss Parameter substitution .
311The character
312.Ic \&$
313is used to introduce substitutable parameters.
314Positional parameters may be assigned values by
315.Ic set  .
316Variables may be set by writing
317.Pp
318.Df I
319.Ar name=value
320.Op Ar name=value
321\&...
322.De
323.Pp
324.Tp Cx Ic \&$
325.Cx \&\ \&
326.Sy \&{
327.Ar parameter
328.Sy \&}
329.Cx
330A
331.Ar parameter
332is a sequence of letters, digits or underscores (a
333.Ar name  ) ,
334a digit, or any of the characters
335.Nm \&* \&@ \&# \&? \&\- \&$ \&!\
336The value, if any, of the parameter is substituted.
337The braces are required only when
338.Ar parameter
339is followed by a letter, digit, or underscore
340that is not to be interpreted as part of its name.  If
341.Ar parameter
342is a digit, it is a positional parameter.  If
343.Ar parameter
344is
345.Ic \&*
346or
347.Ic \&@
348then all the positional parameters, starting with
349.Ic $1 ,
350are substituted separated by spaces.
351.Ic $0
352is set from argument zero when the shell is invoked.
353.Tp Cx Ic \&$
354.Cx \&\ \&
355.Sy \&{
356.Ar parameter
357.Fl
358.Ar word
359.Sy \&}
360.Cx
361If
362.Ar parameter
363is set, substitute its value; otherwise substitute
364.Ar word .
365.Tp Cx Ic \&$
366.Cx \&\ \&
367.Sy \&{
368.Ar parameter
369.Ic \&=
370.Ar word
371.Cx \&\ \&
372.Sy \&}
373.Cx
374If
375.Ar parameter
376is not set, set it to
377.Ar word ;
378the value of the parameter is then substituted.
379Positional parameters may not be assigned to in this way.
380.Tp Cx Ic \&$
381.Cx \&\ \&
382.Sy \&{
383.Ar parameter
384.Ic \&?
385.Ar word
386.Sy \&}
387.Cx
388If
389.Ar parameter
390is set, substitute its value; otherwise, print
391.Ar word
392and exit from the shell.  If
393.Ar word
394is omitted, a standard message is printed.
395.Tp Cx Ic \&$
396.Cx \&\ \&
397.Sy \&{
398.Ar parameter
399.Ic \&+
400.Ar word
401.Sy \&}
402.Cx
403If
404.Ar parameter
405is set, substitute
406.Ar word ;
407otherwise substitute nothing.
408.Tp
409.Pp
410In the above
411.Ar word
412is not evaluated unless it is to be used as the substituted string.
413(So that, for example, echo ${d\-\'pwd\'} will only execute
414.Ar pwd
415if
416.Ar d
417is unset.)
418.Pp
419The following
420.Ar parameters
421are automatically set by the shell.
422.Pp
423.Dw Ds
424.Dp Ic \&#
425The number of positional parameters in decimal.
426.Dp Fl
427Options supplied to the shell on invocation or by
428.Ar set  .
429.Dp Ic \&?
430The value returned by the last executed command in decimal.
431.Dp Ic \&$
432The process number of this shell.
433.Dp Ic \&!
434The process number of the last background command invoked.
435.Dp
436.De
437.Pp
438The following
439.Ar parameters
440are used but not set by the shell.
441.Pp
442.Ds I
443.Tp Ev HOME
444The default argument (home directory) for the
445.Ic cd
446command.
447.Tp Ev PATH
448The search path for commands (see
449.Ar execution  ) .
450.Tp Ev MAIL
451If this variable is set to the name of
452a mail file, the shell informs the user of
453the arrival of mail in the specified file.
454.Tp Ev PS1
455Primary prompt string, by default '$ '.
456.Tp Ev PS2
457Secondary prompt string, by default '> '.
458.Tp Ev IFS
459Internal field separators, normally
460.Em space  ,
461.Em tab ,
462and
463.Em newline  .
464.Ev IFS
465is ignored if
466.Nm sh
467is running as root or if the effective user id differs from the real user id.
468.Tp
469.De
470.Ss Blank interpretation .
471After parameter and command substitution,
472any results of substitution are scanned for internal field separator
473characters (those found in
474.Cx Ic $
475.Ev IFS )
476.Cx
477and split into distinct arguments where such characters are found.
478Explicit null arguments ("" or \'\') are retained.
479Implicit null arguments (those resulting from
480.Em parameters
481that have no values) are removed.
482.Pp
483.Ss File name generation .
484Following substitution, each command word is scanned for the characters
485.Ic \&* ,
486.Ic \&?
487and
488.Ic \&[ .
489If one of these characters appears, the word is regarded as a pattern.
490The word is replaced with alphabetically sorted file names that match the
491pattern.  If no file name is found that matches the pattern,
492the word is left unchanged.  The character
493.Ic \&.
494at the start of a file name or immediately following a
495.Ic \&/ ,
496and the character
497.Ic \&/ ,
498must be matched explicitly.
499.Dp Ic \&*\&
500Matches any string, including the null string.
501.Dp Ic \&?
502Matches any single character.
503.Dp Ic \&[...]
504Matches any one of the characters enclosed.
505A pair of characters separated by
506.Fl
507matches any character lexically between the pair.
508.Dp
509.Pp
510.Ss Quoting .
511The following characters have a special meaning to the shell
512and cause termination of a word unless quoted.
513.Pp
514.Df I
515.Sy \&; \&& \&( \&) \&| \&< \&>
516.Sy newline  space  tab
517.De
518.Pp
519A character may be
520.Ar quoted
521by preceding it with a
522.Sq Sy \e .
523.Sy \enewline
524is ignored.
525All characters enclosed between a pair of quote marks
526.Pq Sq ,
527except a single quote, are quoted.  Inside double quotes
528.Pq Dq
529parameter and command substitution occurs and
530.Sy \e
531quotes the characters
532.Sy \e\' "
533and
534.Sy \&$ .
535.Pp
536.Dq \&$*
537is equivalent to
538.Dq Sy $1 $2 \&...
539whereas
540.br
541.Dq Sy $@
542is equivalent to
543.Dq Sy $1
544.Dq Sy $2
545\&...\ .
546.Pp
547.Ss Prompting .
548When used interactively, the shell prompts with the value of
549.Ev PS1
550before reading a command.
551If at any time a newline is typed and further input is needed
552to complete a command, the secondary prompt
553.Cx Sy $
554.Ev PS2
555.Cx
556is issued.
557.Pp
558.Ss Input/Output .
559Before a command is executed its input and output
560may be redirected using a special notation interpreted by the shell.
561The following may appear anywhere in a simple-command
562or may precede or follow a
563.Ar command
564and are not passed on to the invoked command.
565Substitution occurs before
566.Ar word
567or
568.Ar digit
569is used.
570.Tw Ic
571.Tp Cx Ic \&<
572.Cx \&\ \&
573.Ar word
574.Cx
575Use file
576.Ar word
577as standard input (file descriptor 0).
578.Tp Cx Ic \&>
579.Cx \&\ \&
580.Ar word
581.Cx
582Use file
583.Ar word
584as standard output (file descriptor 1).
585If the file does not exist, it is created;
586otherwise it is truncated to zero length.
587.Tp Cx Ic \&>\&>
588.Cx \&\ \&
589.Ar word
590.Cx
591Use file
592.Ar word
593as standard output.
594If the file exists, output is appended (by seeking to the end);
595otherwise the file is created.
596.Tp Cx Ic \&<\&<
597.Cx \&\ \&
598.Ar word
599.Cx
600The shell input is read up to a line the same as
601.Ar word  ,
602or end of file.
603The resulting document becomes the standard input.
604If any character of
605.Ar word
606is quoted, no interpretation is placed upon the characters of the document;
607otherwise, parameter and command substitution occurs,
608.Sy \enewline
609is ignored, and
610.Sy \e
611is used to quote the characters
612.Sy \&$ \&\'
613and the first character of
614.Ar word .
615.Tp Cx Ic \&<\&&
616.Cx \&\ \&
617.Ar digit
618.Cx
619The standard input is duplicated from file descriptor
620.Ar digit ;
621see
622.Xr dup  2  .
623Similarly for the standard output using
624.Ic \&> .
625.Tp Ic \&<\&&\-
626The standard input is closed.
627Similarly for the standard output using
628.Ic \&> .
629.Tp
630.Pp
631If one of the above is preceded by a digit, the
632file descriptor created is that specified by the digit
633(instead of the default 0 or 1).  For example,
634.Pp
635.Dl \&... 2>&1
636.Pp
637creates file descriptor 2 to be a duplicate
638of file descriptor 1.
639.Pp
640If a command is followed by
641.Ic \&&
642then the default standard input for the command is the empty file
643.Pq Pa dev/null .
644Otherwise, the environment for the execution of a command contains the
645file descriptors of the invoking shell as modified by input
646output specifications.
647.Pp
648.Ss Environment
649The environment is a list of name-value pairs that is passed to
650an executed program in the same way as a normal argument list; see
651.Xr execve  2
652and
653.Xr environ  7  .
654The shell interacts with the environment in several ways.
655On invocation, the shell scans the environment and creates a
656.Ar parameter
657for each name found, giving it the corresponding value.
658Executed commands inherit the same environment.
659If the user modifies the values of these
660.Ar parameters
661or creates new ones, none of these affects the environment unless the
662.Ic export
663command is used to bind the shell's
664.Ar parameter
665to the environment.
666The environment seen by any executed command is thus composed
667of any unmodified name-value pairs originally inherited by the shell,
668plus any modifications or additions, all of which must be noted in
669.Ic export
670commands.
671.Pp
672The environment for any
673.Ar simple-command
674may be augmented by prefixing it with one or more assignments to
675.Ar parameters .
676Thus these two lines are equivalent
677.Pp
678.Dl TERM=450 cmd args
679.Dl (export TERM; TERM=450; cmd args)
680.Pp
681If the
682.Fl k
683flag is set,
684.Ar all
685keyword arguments are placed in the environment,
686even if they occur after the command name.
687The following prints 'a=b c' and 'c':
688.Pp
689.Ds I
690echo a=b c
691set \-k
692echo a=b c
693.De
694.Pp
695.Ss Signals .
696The INTERRUPT and QUIT signals for an invoked
697command are ignored if the command is followed by
698.Ic \&& ;
699otherwise signals have the values inherited by the shell from its parent.
700(But see also
701.Ic trap . )
702.Pp
703.Ss Execution .
704Each time a command is executed the above substitutions are carried out.
705Except for the 'special commands' listed below a new process is created and
706an attempt is made to execute the command via an
707.Xr execve  2  .
708.Pp
709The shell parameter
710.Cx Ic \&$
711.Ev $PATH
712.Cx
713defines the search path for the directory containing the command.
714Each alternative directory name is separated by a colon
715.Pq Sy \&: .
716The default path is
717.Pa :/bin:/usr/bin .
718If the command name contains a
719.Sy / ,
720the search path is not used.
721Otherwise, each directory in the path is searched for an executable file.
722If the file has execute permission but is not an
723.Pa a.out
724file, it is assumed to be a file containing shell commands.
725A subshell (i.e., a separate process) is spawned to read it.
726A parenthesized command is also executed in a subshell.
727.Pp
728.Ss Special commands .
729The following commands are executed in the shell process
730and except where specified
731no input output redirection is permitted for such commands.
732.Tw Fl
733.Tp Ic \&#
734For non-interactive shells, everything following the
735.Ic \&#
736is treated as a comment, i.e. the rest of the line is ignored.
737For interactive shells, the
738.Ic \&#
739has no special effect.
740.Tp Ic \&:\&
741No effect; the command does nothing.
742.Tp Cx Ic \&.\&
743.Ar  file
744.Cx
745Read and execute commands from
746.Ar file
747and return.  The search path
748.Cx Ic \&$
749.Ev PATH
750.Cx
751is used to find the directory containing
752.Ar file  .
753.Tp Cx Ic break
754.Cx \&\ \&
755.Op Ar n
756.Cx
757Exit from the enclosing
758.Ic for
759or
760.Ic while
761loop, if any.
762If
763.Ar n
764is specified, break
765.Ar n
766levels.
767.Tp Cx Ic continue
768.Cx \&\ \&
769.Op Ar n
770.Cx
771Resume the next iteration of the enclosing
772.Ic for
773or
774.Ic while
775loop.  If
776.Ar n
777is specified, resume at the
778.Cx Ar n
779.Cx \'th
780.Cx
781enclosing loop.
782.Tp Cx Ic cd
783.Cx \&\ \&
784.Op Ar arg
785.Cx
786Change the current directory to
787.Ar arg .
788The shell parameter
789.Cx Sy \&$
790.Ev $HOME
791.Cx
792is the default
793.Ar arg  .
794.Tp Cx Ic eval
795.Cx \&\ \&
796.Op Ar arg  \&...
797.Cx
798The arguments are read as input to the shell
799and the resulting command(s) executed.
800.Tp Cx Ic exec
801.Cx \&\ \&
802.Op Ar arg  \&...
803.Cx
804The command specified by the arguments is executed in place of this shell
805without creating a new process.
806Input output arguments may appear and if no other
807arguments are given cause the shell input output to be modified.
808.Tp Cx Ic exit
809.Cx \&\ \&
810.Op Ar n
811.Cx
812Causes a non interactive shell to exit with the exit status specified by
813.Ar n .
814If
815.Ar n
816is omitted, the exit status is that of the last command executed.
817(An end of file will also exit from the shell.)
818.Tp Cx Ic export
819.Cx \&\ \&
820.Op Ar name ...
821.Cx
822The given names are marked for automatic export to the
823.Ar environment
824of subsequently-executed commands.
825If no arguments are given, a list of exportable names is printed.
826.Tp Cx Ic login
827.Cx \&\ \&
828.Op Ar arg ...
829.Cx
830Equivalent to 'exec login arg ...'.
831.Tp Cx Ic read
832.Cx \&\ \&
833.Ar name \&...
834.Cx
835One line is read from the standard input;
836successive words of the input are assigned to the variables
837.Ar name
838in order, with leftover words to the last variable.
839The return code is 0 unless the end-of-file is encountered.
840.Tp Cx Ic readonly
841.Cx \&\ \&
842.Op Ar name \&...
843.Cx
844The given names are marked readonly and
845the values of the these names may not be changed
846by subsequent assignment.
847If no arguments are given, a list of all readonly names is printed.
848.Tp Cx Ic set
849.Cx \&\ \&
850.Op Fl eknptuvx
851.Cx \&\ \&
852.Op Ar arg ...
853.Cx
854The set flags are described in the options section at the beginning
855of this man page.
856The current set of flags may be found in
857.Ic \&$\- .
858.Pp
859Remaining arguments after the flag are positional
860parameters and are assigned, in order, to
861.Ic \&$1 ,
862.Ic \&$2 ,
863etc.  If no arguments are given, the values of all names are printed.
864.Tp Ic shift
865The positional parameters from
866.Ic \&$2 ...
867are renamed
868.Ic $1 ...
869.Tp Ic times
870Print the accumulated user and system times for processes run from the shell.
871.Tp Cx Ic trap
872.Cx \&\ \&
873.Op Ar arg
874.Cx \&\ \&
875.Op Ar n
876.Cx \&\ \& \&...
877.Cx
878.Ar Arg
879is a command to be read and executed when the shell receives signal(s)
880.Ar n .
881(Note that
882.Ar arg
883is scanned once when the trap is set and once when the trap is taken.)
884Trap commands are executed in order of signal number.  If
885.Ar arg
886is absent, all trap(s)
887.Ar n
888are reset to their original values.
889If
890.Ar arg
891is the null
892string, this signal is ignored by the shell and by invoked commands.
893If
894.Ar n
895is 0, the command
896.Ar arg
897is executed on exit from the shell, otherwise upon receipt of signal
898.Ar n
899as numbered in
900.Xr sigvec  2  .
901.Ic Trap
902with no arguments prints a list of commands associated with each signal number.
903.Tp Cx Ic umask
904.Cx \&\ \&
905.Op Ar nnn
906.Cx
907The user file creation mask is set to the octal value
908.Ar nnn
909(see
910.Xr umask  2  ) .
911If
912.Ar nnn
913is omitted, the current value of the mask is printed.
914.Tp Cx Ic wait
915.Cx \&\ \&
916.Op Ar n
917.Cx
918Wait for the specified process and report its termination status.  If
919.Ar n
920is not given, all currently active child processes are waited for.
921The return code from this command is that of the process waited for.
922.Tp
923.Sh FILES
924.Dw (longest file name here)
925.Di L
926.Dp Pa $HOME/.profile
927.Dp Pa /tmp/sh*
928.Dp Pa /dev/null
929.Dp
930.Sh SEE ALSO
931.Xr csh 1 ,
932.Xr test 1 ,
933.Xr execve 2 ,
934.Xr environ 7
935.Sh DIAGNOSTICS
936Errors detected by the shell, such as syntax errors cause the shell
937to return a non zero exit status.
938If the shell is being used non interactively
939then execution of the shell file is abandoned.
940Otherwise, the shell returns the exit status of
941the last command executed (see also
942.Ic exit  ) .
943.Sh HISTORY
944The
945.Nm Sh
946shell appeared in Version 6 AT&T UNIX.
947.SH BUGS
948If
949.Ic \&<\&<
950is used to provide standard input to an asynchronous
951process invoked by
952.Ic \&& ,
953the shell gets mixed up about naming the input document.
954A garbage file
955.Pa /tmp/sh*
956is created, and the shell complains about
957not being able to find the file by another name.
958.\" .Sh ENVIRONMENT
959.\" /usr/src/bin/sh/defs.h:STRING		*setenv();
960.\" /usr/src/bin/sh/name.c:STRING	*setenv()
961.\" /usr/src/bin/sh/service.c:		xecenv=setenv();
962