Skip to content
spiralofhope edited this page Mar 25, 2020 · 4 revisions

See if you can use ${#variable} instead

example code

#!/usr/bin/env  bash

if [ "$( echo "$1" | wc -c )" -gt 1 ]; then
  echo "greater than 1"
fi

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally