In /usr/bin/xdg-mime line 243: [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; ^----------------------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: [ "${XDG_UTILS_DEBUG_LEVEL}" -lt "$1" ] && return 0; In /usr/bin/xdg-mime line 251: read first rest ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/xdg-mime line 260: binary="`which "$1"`" ^----------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: binary="$(which "$1")" In /usr/bin/xdg-mime line 261: binary="`readlink -f "$binary"`" ^---------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: binary="$(readlink -f "$binary")" In /usr/bin/xdg-mime line 262: base="`basename "$binary"`" ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: base="$(basename "$binary")" In /usr/bin/xdg-mime line 274: command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: command="$(grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word)" In /usr/bin/xdg-mime line 275: command="`which "$command"`" ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: command="$(which "$command")" In /usr/bin/xdg-mime line 276: if [ x"`readlink -f "$command"`" = x"$binary" ]; then ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: if [ x"$(readlink -f "$command")" = x"$binary" ]; then In /usr/bin/xdg-mime line 290: desktop="`basename "$1"`" ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: desktop="$(basename "$1")" In /usr/bin/xdg-mime line 299: if [ -r $dir/applications/$vendor/$app ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -r "$dir"/applications/"$vendor"/"$app" ]; then In /usr/bin/xdg-mime line 301: elif [ -r $dir/applnk/$vendor/$app ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. ^-----^ SC2086: Double quote to prevent globbing and word splitting. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif [ -r "$dir"/applnk/"$vendor"/"$app" ]; then In /usr/bin/xdg-mime line 316: command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: command="$(grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word)" In /usr/bin/xdg-mime line 317: command="`which "$command"`" ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: command="$(which "$command")" In /usr/bin/xdg-mime line 327: exit_success() ^-- SC2120: exit_success references arguments, but none are ever passed. In /usr/bin/xdg-mime line 346: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 362: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 374: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 383: exit_failure_operation_failed() ^-- SC2120: exit_failure_operation_failed references arguments, but none are ever passed. In /usr/bin/xdg-mime line 386: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 398: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 410: echo "xdg-mime: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/xdg-mime line 430: file=`basename "$1"` ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: file=$(basename "$1") In /usr/bin/xdg-mime line 453: DIR=`dirname "$1"` ^------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: DIR=$(dirname "$1") In /usr/bin/xdg-mime line 473: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 478: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 483: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 492: if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then ^------------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "${XDG_UTILS_DEBUG_LEVEL-0}" -lt 1 ]; then In /usr/bin/xdg-mime line 551: elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; ^-- SC2092: Remove backticks to avoid executing output. ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: elif $(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1) ; then DE=gnome; In /usr/bin/xdg-mime line 554: elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; ^------^ SC2153: Possible misspelling: DESKTOP may not be assigned, but desktop is. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif echo "$DESKTOP" | grep -q '^Enlightenment'; then DE=enlightenment; In /usr/bin/xdg-mime line 607: version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: version=$(LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE') In /usr/bin/xdg-mime line 608: major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: major=$(echo "$version" | sed 's/KDE.*: \([0-9]\).*/\1/') In /usr/bin/xdg-mime line 609: minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: minor=$(echo "$version" | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/') In /usr/bin/xdg-mime line 610: release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: release=$(echo "$version" | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/') In /usr/bin/xdg-mime line 611: test "$major" -gt 3 && return $1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: test "$major" -gt 3 && return "$1" In /usr/bin/xdg-mime line 612: test "$minor" -gt 5 && return $1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: test "$minor" -gt 5 && return "$1" In /usr/bin/xdg-mime line 613: test "$release" -gt 4 && return $1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: test "$release" -gt 4 && return "$1" In /usr/bin/xdg-mime line 635: eval 'kbuildsycoca${KDE_SESSION_VERSION}'$xdg_redirect_output ^------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval 'kbuildsycoca${KDE_SESSION_VERSION}'"$xdg_redirect_output" In /usr/bin/xdg-mime line 638: for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: for x in $(echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'); do In /usr/bin/xdg-mime line 639: if [ -x $x/update-mime-database ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -x "$x"/update-mime-database ] ; then In /usr/bin/xdg-mime line 641: eval '$x/update-mime-database $1'$xdg_redirect_output ^------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval '$x/update-mime-database $1'"$xdg_redirect_output" In /usr/bin/xdg-mime line 657: kmimetypefinder${KDE_SESSION_VERSION} "$1" 2>/dev/null | head -n 1 ^--------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kmimetypefinder"${KDE_SESSION_VERSION}" "$1" 2>/dev/null | head -n 1 In /usr/bin/xdg-mime line 665: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/xdg-mime line 666: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 668: exit_failure_operation_failed ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 685: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/xdg-mime line 686: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 688: exit_failure_operation_failed ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 702: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/xdg-mime line 703: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 705: exit_failure_operation_failed ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 733: default_dir=`kde4-config --path xdgdata-apps 2> /dev/null | cut -d ':' -f 1` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: default_dir=$(kde4-config --path xdgdata-apps 2> /dev/null | cut -d ':' -f 1) In /usr/bin/xdg-mime line 736: default_dir=`kde-config --path config 2> /dev/null | cut -d ':' -f 1` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: default_dir=$(kde-config --path config 2> /dev/null | cut -d ':' -f 1) In /usr/bin/xdg-mime line 806: eval 'kbuildsycoca4'$xdg_redirect_output ^------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval 'kbuildsycoca4'"$xdg_redirect_output" In /usr/bin/xdg-mime line 841: xdg_config_home="$XDG_CONFIG_HOME" ^--------------^ SC2153: Possible misspelling: XDG_CONFIG_HOME may not be assigned, but xdg_config_home is. In /usr/bin/xdg-mime line 900: local MIME="$1" ^--------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 901: local dir="$2" ^-------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 922: for d in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: for d in $(echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'); do In /usr/bin/xdg-mime line 923: for x in `search_desktop_file "$MIME" "$d/applications"`; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: for x in $(search_desktop_file "$MIME" "$d/applications"); do In /usr/bin/xdg-mime line 924: pref=0`awk -F"=" '/InitialPreference=/ {print($2)}' "$x"` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: pref=0$(awk -F"=" '/InitialPreference=/ {print($2)}' "$x") In /usr/bin/xdg-mime line 927: if [ $pref -gt $preference ]; then ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$pref" -gt $preference ]; then In /usr/bin/xdg-mime line 936: echo `basename $desktop_file` ^----------------------^ SC2046: Quote this to prevent word splitting. ^----------------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^-----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo $(basename "$desktop_file") In /usr/bin/xdg-mime line 937: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 943: local mimetype="$1" dir="$2" ^---------------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 944: local desktop oldifs="$IFS" ^------------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 950: local prefix=$(echo "$desktop-" | tr '[:upper:]' '[:lower:]') ^----------^ SC2039: In POSIX sh, 'local' is undefined. ^----^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/xdg-mime line 952: local prefix= ^----------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 954: local mimeapps_list="$dir/${prefix}mimeapps.list" ^-----------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 957: local result=$(awk -v mimetype="$mimetype" ' ^----------^ SC2039: In POSIX sh, 'local' is undefined. ^----^ SC2155: Declare and assign separately to avoid masking return values. In /usr/bin/xdg-mime line 983: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 996: xdg_config_dirs="$XDG_CONFIG_DIRS" ^--------------^ SC2153: Possible misspelling: XDG_CONFIG_DIRS may not be assigned, but xdg_config_dirs is. In /usr/bin/xdg-mime line 1003: local oldifs="$IFS" dir ^---------------------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/xdg-mime line 1017: for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: for x in $(echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'); do In /usr/bin/xdg-mime line 1020: trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | head -n 1 | cut -d '=' -f 2 | cut -d ';' -f 1` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: trader_result=$(grep "$MIME=" "$x"/applications/"${prefix}"defaults.list "$x"/applications/"${prefix}"mimeinfo.cache 2> /dev/null | head -n 1 | cut -d '=' -f 2 | cut -d ';' -f 1) In /usr/bin/xdg-mime line 1022: echo $trader_result ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo "$trader_result" In /usr/bin/xdg-mime line 1023: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 1028: defapp_fallback $MIME ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: defapp_fallback "$MIME" In /usr/bin/xdg-mime line 1029: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 1039: KTRADER=`which ktraderclient 2> /dev/null` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: KTRADER=$(which ktraderclient 2> /dev/null) In /usr/bin/xdg-mime line 1042: KTRADER=`which ktraderclient${KDE_SESSION_VERSION} 2> /dev/null` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^--------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: KTRADER=$(which ktraderclient"${KDE_SESSION_VERSION}" 2> /dev/null) In /usr/bin/xdg-mime line 1046: KTRADER=`which ktradertest 2> /dev/null` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: KTRADER=$(which ktradertest 2> /dev/null) In /usr/bin/xdg-mime line 1050: trader_result=`$KTRADER --mimetype "$MIME" --servicetype Application 2>/dev/null \ ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: trader_result=$($KTRADER --mimetype "$MIME" --servicetype Application 2>/dev/null \ | grep -E "^DesktopEntryPath : |\.desktop$" | head -n1 | sed "s/^DesktopEntryPath : '\(.*\.desktop\)'\$/\1/") In /usr/bin/xdg-mime line 1054: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 1056: exit_failure_operation_failed ^---------------------------^ SC2119: Use exit_failure_operation_failed "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 1100: filename=`readlink -f -- "$filename"` ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: filename=$(readlink -f -- "$filename") In /usr/bin/xdg-mime line 1177: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. In /usr/bin/xdg-mime line 1278: if [ `whoami` = "root" ] ; then ^------^ SC2046: Quote this to prevent word splitting. ^------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: if [ $(whoami) = "root" ] ; then In /usr/bin/xdg-mime line 1289: if [ "$vendor" = "true" -a "$action" = "install" ] ; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In /usr/bin/xdg-mime line 1303: for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: for x in $(echo $xdg_system_dirs | sed 's/:/ /g'); do In /usr/bin/xdg-mime line 1304: if [ -w $x/$xdg_dir_name ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -w "$x"/$xdg_dir_name ] ; then In /usr/bin/xdg-mime line 1310: [ -w $xdg_global_dir ] || xdg_global_dir= ^-------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: [ -w "$xdg_global_dir" ] || xdg_global_dir= In /usr/bin/xdg-mime line 1317: kde_global_dirs=`kde${KDE_SESSION_VERSION}-config --path mime 2> /dev/null` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^--------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: kde_global_dirs=$(kde"${KDE_SESSION_VERSION}"-config --path mime 2> /dev/null) In /usr/bin/xdg-mime line 1320: for x in `echo $kde_global_dirs | sed 's/:/ /g'` ; do ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^--------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: for x in $(echo "$kde_global_dirs" | sed 's/:/ /g') ; do In /usr/bin/xdg-mime line 1324: elif [ -w $x ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: elif [ -w "$x" ] ; then In /usr/bin/xdg-mime line 1359: basefile=`basename "$filename"` ^--------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: basefile=$(basename "$filename") In /usr/bin/xdg-mime line 1366: mimetypes=`awk < "$filename" ' ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: mimetypes=$(awk < "$filename" ' # Strip XML comments BEGIN { suppress=0 } { do if (suppress) { if (match($0,/-->/)) { $0=substr($0,RSTART+RLENGTH) suppress=0 } else { break } } else { if (match($0,/<!--/)) { if (RSTART>1) print substr($0,0,RSTART) $0=substr($0,RSTART+RLENGTH) suppress=1 } else { if ($0) print $0 break } } while(1) } ' | awk ' # List MIME types listed in <mime-type> tags BEGIN { RS="<" } /^mime-info/, /^\/mime-info/ { if (match($0,/^mime-type/)) { if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) { print substr($0,RSTART+6,RLENGTH-6) } } }') In /usr/bin/xdg-mime line 1413: save_umask=`umask` ^-----^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: save_umask=$(umask) In /usr/bin/xdg-mime line 1417: mkdir -p $x ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: mkdir -p "$x" In /usr/bin/xdg-mime line 1418: eval 'cp $filename $x/$basefile'$xdg_redirect_output ^------------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: eval 'cp $filename $x/$basefile'"$xdg_redirect_output" In /usr/bin/xdg-mime line 1425: mkdir -p `dirname $kde_dir/$x.desktop` ^---------------------------^ SC2046: Quote this to prevent word splitting. ^---------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: mkdir -p $(dirname "$kde_dir"/"$x".desktop) In /usr/bin/xdg-mime line 1455: ' | awk > $kde_dir/$x.desktop ' ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: ' | awk > "$kde_dir"/"$x".desktop ' In /usr/bin/xdg-mime line 1532: ' $x $basefile ^-- SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: ' "$x" "$basefile" In /usr/bin/xdg-mime line 1534: grep -A 10 "^Error:" $kde_dir/$x.desktop >&2 ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: grep -A 10 "^Error:" "$kde_dir"/"$x".desktop >&2 In /usr/bin/xdg-mime line 1535: rm $kde_dir/$x.desktop ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm "$kde_dir"/"$x".desktop In /usr/bin/xdg-mime line 1541: umask $save_umask ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: umask "$save_umask" In /usr/bin/xdg-mime line 1546: rm -f $x/$basefile ^-- SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm -f "$x"/"$basefile" In /usr/bin/xdg-mime line 1551: if grep '^# Installed by xdg-mime' $kde_dir/$x.desktop >/dev/null 2>&1; then ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if grep '^# Installed by xdg-mime' "$kde_dir"/"$x".desktop >/dev/null 2>&1; then In /usr/bin/xdg-mime line 1553: rm -f $kde_dir/$x.desktop ^------^ SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm -f "$kde_dir"/"$x".desktop In /usr/bin/xdg-mime line 1559: update_mime_database $xdg_base_dir ^-----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: update_mime_database "$xdg_base_dir" In /usr/bin/xdg-mime line 1561: exit_success ^----------^ SC2119: Use exit_success "$@" if function's $1 should mean script's $1. For more information: https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined. https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...