We can open a parent folder of any file using nautilus script like
#!/bin/bash
nautilus "$1"
If I do this script on symbolic link which is on the ~/Desktop, then it will open the Desktop itself.
How can I recode this script to open the parent of actual file symbolic link is bound to? For example, if I have a sym link file Desktop/my-doc.doc
linking to the doc file located in /media/myharddisk/my-doc.doc
, the script will open /media/myharddisk/ and NOT ~/Desktop in Nautilus.