Hi everybody,
I'm sorry If I ask a silly question. I have a simple code like this
#!/bin/bash
verify()
{
// do something
return $(grep -q 'VERIFICATION SUCCESSFUL' result.txt)
}
if [ verify 'a Condition' ]; then
echo debug
fi
I have the following error:
line x: [: verify: unary operator expected
Can anyone explain for me why I have this error, and how can I correct it?
Thanks in advance.