ff4ff35918
Red Bear OS is a full fork. All sources must be available from git clone with zero network access. Removed gitignore rules that excluded fetched source trees under recipes/*/source/, local/recipes/kde/*/source/, local/recipes/qt/*/source/, and vendor source trees. Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded. 127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt frameworks, mesa, wayland, DRM drivers, and every other recipe source.
34 lines
667 B
Plaintext
34 lines
667 B
Plaintext
# Test the shift builtin.
|
|
|
|
%test
|
|
|
|
set -- one two three four five six seven eight nine ten
|
|
shift
|
|
print $*
|
|
shift 2
|
|
print $*
|
|
shift -p 3
|
|
print $*
|
|
shift -p
|
|
print $*
|
|
0:shifting positional parameters
|
|
>two three four five six seven eight nine ten
|
|
>four five six seven eight nine ten
|
|
>four five six seven
|
|
>four five six
|
|
|
|
array=(yan tan tether mether pip azer sezar akker conter dick)
|
|
shift 2 array
|
|
print $array
|
|
shift array
|
|
print $array
|
|
shift -p 3 array
|
|
print $array
|
|
shift -p array
|
|
print $array
|
|
0:shifting array
|
|
>tether mether pip azer sezar akker conter dick
|
|
>mether pip azer sezar akker conter dick
|
|
>mether pip azer sezar
|
|
>mether pip azer
|