In bash, how can I print the first n elements of a list?
bash
n
For example, the first 10 files in this list:
FILES=$(ls)
FILE="$(ls | head -1)"
Handled spaces in filenames correctly too when I tried it.