Use o comando test
.
pastas@ubuntan:~/tmp$ ls -alth
total 16K
drwxrwxr-x 2 pastas pastas 4.0K Dec 16 17:18 .
lrwxrwxrwx 1 pastas pastas 9 Dec 14 18:34 robot.cpp_2 -> robot.cpp
-rw-rw-r-- 1 pastas pastas 106 Dec 14 16:13 robot.cpp
pastas@ubuntan:~/tmp$ test -L robot.cpp_2 && echo "sym" || echo "not sym"
sym
pastas@ubuntan:~/tmp$ test -L robot.cpp && echo "sym" || echo "not sym"
not sym