Remove one indexed element.
Section: Indexed Arrays
Unset array element
bash
bash
unset 'files[1]'Explanation
Remaining indexes are preserved; arrays can be sparse.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Indexed Arrays