This may be a basic bash array/string operation related question, but I couldn't find any direct answer. So here it goes:
I have a lot of data sorted in various directories. All directories need same processing except for a special group of directories. I have a symbolic link of the script in discussion in each directory. I want the script to get the name of the current directory, check if that belongs to special group and do specific operations.
So I get the name of the directory
Now the the group of directories that needs something different to be done, contains these directories:
user member default MIT qly ...
I was thinking if something like this is possible:
GRPS=(user member default MIT qly ...)
if [[ $mm is a member of $GRPS array ]]; then
So essentially I am looking for an operator/function that searches for a substring/member in a string/array and returns some indication of success or failure.