Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

If + expr

$
0
0
Hi

I have bellow script:

Code:

t1=`cat node1.txt | grep thread1 | cut -f2 -d '-'`
t2=`cat node2.txt | grep thread2 | cut -f2 -d '-'`

t3=`cat node1_rcat.txt | grep thread1 | cut -f2 -d '-'`
t4=`cat node2_rcat.txt | grep thread2 | cut -f2 -d '-'`

if [[ `expr $1 + $2` == `expr $3 + $4` ]]; then
echo "no restore" >> log.log
exit;
fi
echo "need restore"  >> log.log

when I execute this script I have this error:
Code:

expr: 0402-050 Syntax error.
expr: 0402-050 Syntax error.

pls help

Viewing all articles
Browse latest Browse all 16232

Trending Articles