Bash scripting missing ']'
I got this error while trying to use the &&
operator inside single brackets like [ ... && ... ]
. I had to switch to [[ ... && ... ]]
.
Change
if [ -s "p1"]; #line 13
into
if [ -s "p1" ]; #line 13
note the space.