Aug 29, 2017 · 1 min read
After a quick www.shellcheck.net review:
for file in ~/.bashrc.d/*.bashrc;
do
source “${file}”
done
Iterating over ls results is notoriously tricky. Also, always quote your variables. More importantly, never use a bash script you haven’t checked with shellcheck (in addition to the online version, you can install it locally and there are tons of nifty integrations to editors and IDEs
