#!/bin/bash
my_str="str1"
if [[ $my_str = @(str1|str2|str3) ]]; then
echo "striтg found"
fi
См. Bash extglob (extended globbing)
Комментариев нет:
Отправить комментарий