Skip to content

Conversation

@sweavo
Copy link

@sweavo sweavo commented Jan 21, 2015

Hi,

Thanks for this cool script. I noticed a bunch of bash errors when you give it an argument with spaces in, e.g.

$ spotfind.sh "Disk Utility" 
spotfind.sh: line 8: [: too many arguments
spotfind.sh: line 12: [: too many arguments
spotfind.sh: line 12: [: too many arguments
spotfind.sh: line 12: [: too many arguments
spotfind.sh: line 41: [: too many arguments
spotfind.sh: line 41: [: too many arguments
spotfind.sh: line 56: [: too many arguments
spotfind.sh: line 56: [: too many arguments
spotfind.sh: line 58: [: too many arguments
spotfind.sh: line 58: [: too many arguments

...so I added a bunch of quote marks in the if statements.

I also added a couple of tests. t2.sh reproduces the bug.

Hope you enjoy!

Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant