SHIFT
[/?]
[number]
/?In the 16-bit CMD supplied with IBM OS/2, only ten batch file parameters, %0 to %9, are accessible, and SHIFT's primary use is to access further parameters. Since this command interpreter allows access to a greater range of batch file parameters, the use of SHIFT should be much diminished.
The SHIFT command varies the offset that is applied when accessing batch file parameters via the "numbered" variables %0, %1, %2, and so forth. This offset is added to the number to yield the number of the parameter that is actually used.
By default, the offset is initialised to zero, so, for example, %7 will access the seventh batch file parameter. However, SHIFT can be used to vary this offset up or down. By default, if no argument is supplied to SHIFT, the offset is increased by one. Otherwise the offset is increased by whatever number is supplied.
The number is a signed quantity. Specifying a negative number, by prefixing it with a minus sign (and using the "--" option to prevent the minus being interpreted as the option switch character) will decrease the offset. If the decrease would make the offset negative, it will be silently set to zero.