Last active
January 15, 2026 01:45
-
-
Save gabrielfalcao/20cb009eab55bc393d3939bcf188f8e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bash -c 'declare my_arr=( item{1..9});declare -i pos_last=$(( ${#my_arr[@]} - 1 ));echo ${my_arr[@]@A}; echo ${pos_last@A};until [ ${#my_arr[@]} -eq 0 ]; do pos_last=$(( ${#my_arr[@]} - 1 ));echo ${my_arr[@]@A}; echo ${pos_last@A}; set -v;my_arr=(${my_arr[@]:0:${pos_last}});set +v;echo ${my_arr[@]@A}; echo ${pos_last@A};done;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment