In my script I have this line:
[ -z "$(file $1 | grep '256')" ] && echo 256
If $1 contains spaces, then I get the error message
line 11: [: too many arguments
How can I properly quote this so that it is runs correctly?
UPDATE:
I pasted the line from my script incorrectly. The error message is correct for this line
[ -z $(file "$1" | grep '256') ] && echo 256