Reputation: 103
I want something similar to this:
if [ -d "$1" ]
then
echo "Directory"
but with soft link:
if [ ??? "$1" ]
then
echo "Softlink"
Upvotes: 1
Views: 2554
Reputation: 591
According to docs Bash-Beginners-Guide:
[ -h FILE ] True if FILE exists and is a symbolic link.
Upvotes: 3