summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfunctions/aliases.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/functions/aliases.sh b/functions/aliases.sh
index 031dc0e..c4e0290 100755
--- a/functions/aliases.sh
+++ b/functions/aliases.sh
@@ -16,3 +16,22 @@ Truncate ()
: > ${FILE}
done
}
+
+In_list ()
+{
+ NEEDLES="${1}"
+ shift
+
+ for ITEM in ${@}
+ do
+ for NEEDLE in ${NEEDLES}
+ do
+ if [ "${NEEDLE}" = "${ITEM}" ]
+ then
+ return 0
+ fi
+ done
+ done
+
+ return 1
+}