@wallhackio i developed a much better intuition fur how shell purrogramming works from reading its multiple chapters on the topic

@aescling the syntax is very confusing and i do not udnerstand what is happening half the time

@vaporeon_ @aescling for((i=0; i<${#files[@]}; i++)); do to loop over an array is not yet understood by me. the nested parenthesis, the # for some reason, what is @

Follow

@wallhackio @vaporeon_ this is bash-specific territory, where many features are added and language complexity explodes. there are nice conveniences but the funkiness of the language on top of the already funky nature of POSIX shell makes me want to avoid it where pawsible

@aescling @wallhackio Stupid question: Does POSIX shell have parameter expansions?

@vaporeon_ @wallhackio yes but not all of bash’s fancy expansions. you definitely do not have arrays lol

@vaporeon_ @wallhackio basic parameter expansion was in the original Bourne shell; i would have been shocked if some take on it hadn’t been standardized

@wallhackio @vaporeon_ anyway

purr the Pure Bash Bible, the double parentheses are an alternate C-style syntax fur for loops with apparently similar semantics

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.