I don’t know bash scripting

if [ -d ~/.bashrc.d ]; then
	for rc in ~/.bashrc.d/*; do
		if [ -f "$rc" ]; then
			. "$rc"
		fi
	done

I asked chatgpt and it said this is non standard? There is no bashrc.d directory on my home folder, I have uncommented the lines for now but dont know if this is benign or malignant

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    It just checks to see if there is anything in a bash.d folder, if there isn’t it moves on. Just somebody being preemptively helpful to check for other locations