In /usr/bin/tzselect line 36: : ${AWK=awk} ^--------^ SC2223: This default assignment may cause DoS due to globbing. Quote it. In /usr/bin/tzselect line 37: : ${TZDIR=/usr/share/zoneinfo} ^--------------------------^ SC2223: This default assignment may cause DoS due to globbing. Quote it. In /usr/bin/tzselect line 116: select_width=`expr $# : '.*'` ^--------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: select_width=$(expr $# : '.*') In /usr/bin/tzselect line 127: select_i=`expr $select_i + 1` ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. Did you mean: select_i=$(expr $select_i + 1) In /usr/bin/tzselect line 128: printf >&2 "%${select_width}d) %s\\n" $select_i "$select_word" ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: printf >&2 "%${select_width}d) %s\\n" "$select_i" "$select_word" In /usr/bin/tzselect line 133: if test 1 -le $select_i && test $select_i -le $#; then ^-------^ SC2086: Double quote to prevent globbing and word splitting. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if test 1 -le "$select_i" && test "$select_i" -le $#; then In /usr/bin/tzselect line 134: shift `expr $select_i - 1` ^------------------^ SC2046: Quote this to prevent word splitting. ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. ^-------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: shift $(expr "$select_i" - 1) In /usr/bin/tzselect line 143: read select_i || exit ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/tzselect line 157: -help) ^---^ SC2214: This case is not specified by getopts. In /usr/bin/tzselect line 159: -version) ^------^ SC2214: This case is not specified by getopts. In /usr/bin/tzselect line 168: shift `expr $OPTIND - 1` ^----------------^ SC2046: Quote this to prevent word splitting. ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. Did you mean: shift $(expr $OPTIND - 1) In /usr/bin/tzselect line 179: <"$f" || { ^---^ SC2188: This redirection doesn't have a command. Move to its command (or use 'true' as no-op). In /usr/bin/tzselect line 189: { tmp=`(mktemp -d) 2>/dev/null` || { ^-----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: { tmp=$((mktemp -d) 2>/dev/null) || { In /usr/bin/tzselect line 193: trap 'status=$?; rm -fr -- "$tmp"; exit $status' 0 HUP INT PIPE TERM && ^-- SC2154: status is referenced but not assigned. In /usr/bin/tzselect line 194: (iconv -f UTF-8 -t //TRANSLIT <"$TZ_COUNTRY_TABLE" >$tmp/iso3166.tab) \ ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: (iconv -f UTF-8 -t //TRANSLIT <"$TZ_COUNTRY_TABLE" >"$tmp"/iso3166.tab) \ In /usr/bin/tzselect line 197: iconv -f UTF-8 -t //TRANSLIT <"$TZ_ZONE_TABLE" >$tmp/$zonetabtype.tab && ^--^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: iconv -f UTF-8 -t //TRANSLIT <"$TZ_ZONE_TABLE" >"$tmp"/"$zonetabtype".tab && In /usr/bin/tzselect line 207: output_distances=' ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. In /usr/bin/tzselect line 309: quoted_continents=` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: quoted_continents=$( $AWK ' BEGIN { FS = "\t" } /^[^#]/ { entry = substr($3, 1, index($3, "/") - 1) if (entry == "America") entry = entry "s" if (entry ~ /^(Arctic|Atlantic|Indian|Pacific)$/) entry = entry " Ocean" printf "'\''%s'\''\n", entry } ' <"$TZ_ZONE_TABLE" | sort -u | tr '\n' ' ' echo '' ) In /usr/bin/tzselect line 310: $AWK ' ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. In /usr/bin/tzselect line 327: doselect '"$quoted_continents"' \ ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. In /usr/bin/tzselect line 328: "coord - I want to use geographical coordinates." \ ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. In /usr/bin/tzselect line 348: read TZ ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/tzselect line 351: time = "(2[0-4]|[0-1]?[0-9])" \ ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. In /usr/bin/tzselect line 355: jdate = "((J[1-9]|[0-9]|J?[1-9][0-9]" \ ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. In /usr/bin/tzselect line 358: tzpattern = "^(:.*|" tzname offset "(" tzname \ ^-- SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line. In /usr/bin/tzselect line 377: read coord;; ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/tzselect line 379: distance_table=`$AWK \ ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: distance_table=$($AWK \ -v coord="$coord" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ "$output_distances" <"$TZ_ZONE_TABLE" | sort -n | sed "${location_limit}q" ) In /usr/bin/tzselect line 386: regions=`say "$distance_table" | $AWK ' ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. Did you mean: regions=$(say "$distance_table" | $AWK ' BEGIN { FS = "\t" } { print $NF } ') In /usr/bin/tzselect line 393: doselect $regions ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: doselect "$regions" In /usr/bin/tzselect line 395: TZ=`say "$distance_table" | $AWK -v region="$region" ' ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. Did you mean: TZ=$(say "$distance_table" | $AWK -v region="$region" ' BEGIN { FS="\t" } $NF == region { print $4 } ') In /usr/bin/tzselect line 402: countries=`$AWK \ ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. Did you mean: countries=$($AWK \ -v continent="$continent" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' BEGIN { FS = "\t" } /^#/ { next } $3 ~ ("^" continent "/") { ncc = split($1, cc, /,/) for (i = 1; i <= ncc; i++) if (!cc_seen[cc[i]]++) cc_list[++ccs] = cc[i] } END { while (getline <TZ_COUNTRY_TABLE) { if ($0 !~ /^#/) cc_name[$1] = $2 } for (i = 1; i <= ccs; i++) { country = cc_list[i] if (cc_name[country]) { country = cc_name[country] } print country } } ' <"$TZ_ZONE_TABLE" | sort -f) In /usr/bin/tzselect line 433: doselect $countries ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: doselect "$countries" In /usr/bin/tzselect line 441: regions=`$AWK \ ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. Did you mean: regions=$($AWK \ -v country="$country" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' BEGIN { FS = "\t" cc = country while (getline <TZ_COUNTRY_TABLE) { if ($0 !~ /^#/ && country == $2) { cc = $1 break } } } /^#/ { next } $1 ~ cc { print $4 } ' <"$TZ_ZONE_TABLE") In /usr/bin/tzselect line 464: doselect $regions ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: doselect "$regions" In /usr/bin/tzselect line 471: TZ=`$AWK \ ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that. Did you mean: TZ=$($AWK \ -v country="$country" \ -v region="$region" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' BEGIN { FS = "\t" cc = country while (getline <TZ_COUNTRY_TABLE) { if ($0 !~ /^#/ && country == $2) { cc = $1 break } } } /^#/ { next } $1 ~ cc && $4 == region { print $3 } ' <"$TZ_ZONE_TABLE") In /usr/bin/tzselect line 493: <"$TZ_for_date" || { ^-------------^ SC2188: This redirection doesn't have a command. Move to its command (or use 'true' as no-op). In /usr/bin/tzselect line 505: for i in 1 2 3 4 5 6 7 8 ^-^ SC2034: i appears unused. Verify use (or export if used externally). In /usr/bin/tzselect line 507: TZdate=`LANG=C TZ="$TZ_for_date" date` ^-----------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: TZdate=$(LANG=C TZ="$TZ_for_date" date) In /usr/bin/tzselect line 508: UTdate=`LANG=C TZ=UTC0 date` ^-------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: UTdate=$(LANG=C TZ=UTC0 date) In /usr/bin/tzselect line 509: TZsec=`expr "$TZdate" : '.*:\([0-5][0-9]\)'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: TZsec=$(expr "$TZdate" : '.*:\([0-5][0-9]\)') In /usr/bin/tzselect line 510: UTsec=`expr "$UTdate" : '.*:\([0-5][0-9]\)'` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: UTsec=$(expr "$UTdate" : '.*:\([0-5][0-9]\)') In /usr/bin/tzselect line 512: $UTsec) ^----^ SC2254: Quote expansions in case patterns to match literally rather than as a glob. For more information: https://www.shellcheck.net/wiki/SC2034 -- i appears unused. Verify use (or ... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2154 -- status is referenced but not assi...