EMBED THIS RECORDING:
<div><script id="playterm-MjAxMy0xMi9kb250dXNlbHN0dHlyZWMtMTM4NjUwNzkzNXw4MHgyNA==" type="text/javascript" src="https://playterm.org/js/?hash=MjAxMy0xMi9kb250dXNlbHN0dHlyZWMtMTM4NjUwNzkzNXw4MHgyNA==" class="size:80x24"></script></div>
I recorded this `dont use ls but glob instead` shellsession because it is very easy to miseducate
yourself concerning bashscripting.
Do yourself a favour and use bash arrays. Run this in your console and you'll understand:
files=(*)
echo "${files[0]}"
echo "${files[@]}"
echo "${files[@]:0:2}"
Use this instead of using ls.
This will prevent you a lot of trouble,hassle and lot of code.