bash if is symlink code example
Example: bash if is symlink
if [[ -L "$file" && -d "$file" ]]
then
echo "$file is a symlink to a directory"
fi
if [[ -L "$file" && -d "$file" ]]
then
echo "$file is a symlink to a directory"
fi