This is somewhat of a simple question, but for the life of me, I cannot figure out how to exclude something from a zsh for loop. For instance, let's say we have this:
for $package in /home/user/settings/*
do
# do stuff
done
Let's say that in /home/user/settings/
, there is a particular directory ("os") that I want to ignore. Logically, I tried the following variations:
for $package in /home/user/settings/^os (works w/ "ls", but not with a foor loop)
for $package in /home/user/settings/*^os
for $package in /home/user/settings/^os*
...but none of those seem to work. Could someone steer my syntax in the right direction?