Bash annoyances Posted on October 3, 2021 by admin range-based for-loop takes the {1…10} literally like what goes on under the colon-operator ‘:’ in MATLAB. That means you cannot do {1…${M}$} (https://www.cyberciti.biz/faq/unix-linux-iterate-over-a-variable-range-of-numbers-in-bash/)