#!/bin/bash
export PROCNAME=test
export TABLE_ID=0
if [ ${TABLE_ID} -eq "" ]; then
echo hello
fi
above throws error:
[: -eq: unary operator expected
How to fix this with out double square brackets [[ ${TABLE_ID} -eq "" ]]
.
Test string equality with =
.
#!/bin/bash
export PROCNAME=test
export TABLE_ID=0
if [ "${TABLE_ID}" = "" ]; then
echo hello
fi