|
#!/bin/bash
t1="192.168.2.3"
t2="192,168,2,25"
if [ $t1 -ne $t2 ]
then
echo "t1 in fact is $t1"
fi
[root@rhel ~93]#cat nu
#!/bin/bash
t1="192.168.2.3"
t2="192,168,2,25"
if [ $t1 -ne $t2 ]
then
echo "t1 in fact is $t1"
fi
[root@rhel ~94]#./nu
./nu: line 4: [: 192.168.2.3: integer expression expected
[root@rhel ~95]#
请问是哪里错了 |
|