如何检查给定参数是否为 symlink/soft link?在 bash
How to check if a given parameter is a symlink/soft link? in bash
我想要类似这样的东西:
if [ -d "" ]
then
echo "Directory"
但软 link:
if [ ??? "" ]
then
echo "Softlink"
根据文档 Bash-Beginners-Guide:
[ -h FILE ] True if FILE exists and is a symbolic link.
我想要类似这样的东西:
if [ -d "" ]
then
echo "Directory"
但软 link:
if [ ??? "" ]
then
echo "Softlink"
根据文档 Bash-Beginners-Guide:
[ -h FILE ] True if FILE exists and is a symbolic link.