#!/bin/sh
a=
"$1"
b=
"$2"
echo
"输入的原始值:a=$a,b=$b"
if
[
"$a"
=
"$b"
];
then
echo
"[ = ]"
fi
if
[
"$a"
==
"$b"
];
then
echo
"[ == ]"
fi
if
[[
"$a"
== a* ]];
then
echo
"[[ ==a* ]]"
fi
if
[[
"$a"
==
"a*"
]];
then
echo
"==/"
a*/
""
fi
if
[
"$a"
== a* ];
then
echo
"[ ==a* ]"
fi
if
[
"$a"
==
"a*"
];
then
echo
"==/"
a*/
""
fi
if
[
"$a"
!=
"$b"
];
then
echo
"[ != ]"
fi
if
[[
"$a"
!=
"$b"
]];
then
echo
"[[ != ]]"
fi
if
[ -n
"$a"
];
then
echo
"[ -n ]"
fi
if
[ -z
"$a"
];
then
echo
"[ -z ]"
fi
if
[ $a /< $b ];
then
echo
"[ < ]"
fi
if
[[ $a < $b ]];
then
echo
"[[ < ]]"
fi
if
[ $a /> $b ];
then
echo
"[ > ]"
fi
if
[[ $a > $b ]];
then
echo
"[[ > ]]"
fi
posted on 2015-09-15 14:52
xzc 阅读(1867)
评论(1) 所属分类:
linux/unix