.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved .TH "SHIFT" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" .\" shift .SH NAME shift \- shift positional parameters .SH SYNOPSIS .LP \fBshift\fP \fB[\fP\fIn\fP\fB]\fP .SH DESCRIPTION .LP The positional parameters shall be shifted. Positional parameter 1 shall be assigned the value of parameter (1+\fIn\fP), parameter 2 shall be assigned the value of parameter (2+\fIn\fP), and so on. The parameters represented by the numbers \fB"$#"\fP down to \fB"$#-n+1"\fP shall be unset, and the parameter \fB'#'\fP is updated to reflect the new number of positional parameters. .LP The value \fIn\fP shall be an unsigned decimal integer less than or equal to the value of the special parameter \fB'#'\fP . If \fIn\fP is not given, it shall be assumed to be 1. If \fIn\fP is 0, the positional and special parameters are not changed. .SH OPTIONS .LP None. .SH OPERANDS .LP See the DESCRIPTION. .SH STDIN .LP Not used. .SH INPUT FILES .LP None. .SH ENVIRONMENT VARIABLES .LP None. .SH ASYNCHRONOUS EVENTS .LP Default. .SH STDOUT .LP Not used. .SH STDERR .LP The standard error shall be used only for diagnostic messages. .SH OUTPUT FILES .LP None. .SH EXTENDED DESCRIPTION .LP None. .SH EXIT STATUS .LP The exit status is >0 if \fIn\fP>$#; otherwise, it is zero. .SH CONSEQUENCES OF ERRORS .LP Default. .LP \fIThe following sections are informative.\fP .SH APPLICATION USAGE .LP None. .SH EXAMPLES .sp .RS .nf \fB$\fP \fBset a b c d e \fP\fB$\fP \fBshift 2 \fP\fB$\fP \fBecho $* \fP\fBc d e\fP .fi .RE .SH RATIONALE .LP None. .SH FUTURE DIRECTIONS .LP None. .SH SEE ALSO .LP \fISpecial Built-In Utilities\fP .SH COPYRIGHT Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .