bash - Error in shell script if condition -


this question has answer here:

i didnt understand error here iam new shell scripting. please me

./bpr: line 8: syntax error near unexpected token `then' ./bpr: line 8: `    if[$(grep -o bpr $file | wc -l) == 1]; ' 

you need add spaces between [ ], try this:

if [ $(grep -o bpr $file | wc -l) == 1 ]; 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -