summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwgetpaste6
1 files changed, 3 insertions, 3 deletions
diff --git a/wgetpaste b/wgetpaste
index 900feb3..cb77754 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -360,12 +360,12 @@ convert_to_raw() {
# convert groups of short options to singular short options. convert long options to short options.
for arg in "${@}"; do
- if [[ "${arg}" =~ ^--.*= ]]; then
+ if [[ "${arg}" == --*=* ]]; then
ARGS[${#ARGS[*]}]="${arg%=*}"
ARGS[${#ARGS[*]}]="${arg#*=}"
- elif [[ "${arg}" =~ ^-- ]]; then
+ elif [[ "${arg}" == --* ]]; then
ARGS[${#ARGS[*]}]="${arg}"
- elif [[ "${arg}" =~ ^- ]]; then
+ elif [[ "${arg}" == -* ]]; then
for short_arg in $(echo "${arg#-}" | sed 's|.| -&|g'); do
ARGS[${#ARGS[*]}]="${short_arg}"
done