这句shell命令该怎么解释?

echo `expr 2 \* 3 \> 5`
引用:
引用:

#!/bin/bash
if ["$1##*."="tar"]
then
echo "this is a tarball".
else
echo "this is not a tarball"。
fi

看个后缀名就可以了吧 Neutral
下面不是更好?
[code:1]
#!/bin/bash

if [ ! -z "`file $1 | grep bzip2`" ]; then
        echo "bunzip2"
elif [ ! -z "`file $1 | grep gzip`" ]; then
        echo "gunzip"
elif [ ! -z "`file $1 | grep Zip`" ]; then
        echo "unzip"
#
#add other file type
#
else
        echo "other"
fi
[/code:1]
[quote:0563f7c382="steaven"]请帮忙看一下下面的SHELL 脚本(mytar.sh)有什么问题:
#!/bin/bash
if ["$1##*."="tar"]
   then
    echo "this is a tarball".
else
   echo  "this is not a tarball"。
fi
在命令行输入/root/mytar.sh  file.tar时总是提示
line2:[tar=tar] command not found
l第三行的`THEN`是多余的.
以上是在RH9上做的.[/quote]
[]内各项要有至少一个空格,即
[code:1]
[ "$1##*." = "tar" ]
[/code:1]
正确的判断应该用file,[code:1]
file $1|grep -q "tar archive"&&echo $1 "is a tarball file"||echo $1 "is not a tarball file"[/code:1]