Skip to content

Commit

Permalink
shellcheck: avoid unnecessary negation
Browse files Browse the repository at this point in the history
Shellcheck advises:

  SC2236: Use -n instead of ! -z.
  • Loading branch information
aklomp committed May 22, 2022
1 parent 12f53df commit d5f605a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shrinkpdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ if [ -z "$IFILE" ]; then
fi

# Output filename defaults to "-" (stdout) unless given:
if [ ! -z "$2" ]; then
if [ -n "$2" ]; then
OFILE="$2"
else
OFILE="-"
fi

# Output resolution defaults to 72 unless given:
if [ ! -z "$3" ]; then
if [ -n "$3" ]; then
res="$3"
else
res="72"
Expand Down

0 comments on commit d5f605a

Please sign in to comment.