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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -