sethleedy / GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT

Purpose of this BASH script is to allow easy downloading of Security Now (GRC.Com/SecurityNow) podcasts and files related to it.
27 stars 4 forks source link

Integer Expression Expected #16

Closed LwsBtlr closed 6 years ago

LwsBtlr commented 6 years ago

created a new folder in ~/Sites/ and ran ~/bin/grc-sn.sh -all -ahq -create-rss-audio -pd 4

which generated three errors:

Users/lbutlr/bin/grc-sn.sh: line 221: [: : integer expression expected /Users/lbutlr/bin/grc-sn.sh: line 221: [: : integer expression expected /Users/lbutlr/bin/grc-sn.sh: line 221: [: : integer expression expected

bash --version GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin17.0.0) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

Line 221 is if [ "$DISK_SPACE" -le "$1" ]; then in my copy of the script. The line that defines this is df -T on line 217, and df -T "pwd" returns nothing on my computer and -T wants a type of filesystem according to the man page, not a path.

This works:

/bin/df "``pwd``" | grep -iv "Filesystem" | awk '{print $4}'

sethleedy commented 6 years ago

Was this on the latest version ?

Thank you for all the details.

sethleedy commented 6 years ago

Can you give me some additional information ? What system are you using ? Was this the latest version ?

sethleedy commented 6 years ago

Updated the code in Dev branch.

sethleedy commented 6 years ago

Believed Fixed in current Development.