Quote:
Originally Posted by baf
Statuses are returned correctly on my K5:
Code:
[root@kindle test]# image="hello"; echo "$image" | grep -q "x"; echo $?
1
[root@kindle test]# image="hello"; echo "$image" | grep -q "h"; echo $?
0
|
I see...it works that way...
But, using this (to check for spaces in variable image):
Code:
echo "$image" | grep -q " "
if [[ $? -eq 0 ]]
then
the if is always executed.
I managed to solve using this:
Code:
check=$(echo "$image" | grep " ")
if [[ -n "$check" ]]
then