1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 06:02:08 +02:00
tldr/pages/common/shift.md
4G3NT 52447db138
Replace "Bash" with "Shell" (#10301)
The shift command is defined in the POSIX standard. It is not a Bash built-in command. Saying this implies that it's Bash-only, which is not true.

More info here:
https://manned.org/shift.1p
2023-05-31 00:05:53 +05:30

12 lines
366 B
Markdown

# shift
> Shell built-in command that shifts the arguments passed to the calling function or script by a specified number of places.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-shift>.
- Move arguments by one place dropping the first argument:
`shift`
- Move arguments by N places dropping the first N arguments:
`shift {{N}}`