forked from SBU-BMI/uploadHeatmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.sh
30 lines (26 loc) · 942 Bytes
/
helpers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#---------------------------------------------------
# File: Helper Function Library
#---------------------------------------------------
#---------------------------------------------------
# Function: chk_opt
# Description: Takes an argument and determines if it
# is a flag instead of an parameter value.
# parameters: cl argument
# usage: opterr="$(chk_opt ${2})"
#---------------------------------------------------
function chk_opt() {
# Check the first char of the option passed
checkc="$(echo $1 | head -c 1)"
if [ $checkc == "-" ]
then
echo 'true'
else
echo 'false'
fi
}
#-----------------------------------------------------------------------
# End chk_opt
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# end functions
#-----------------------------------------------------------------------