Comment

Samat Jain

Not sure if it was part of GNU coreutils when you wrote this, but there's readlink[1]. Use:

readlink -f the-file

[1]: http://unixhelp.ed.ac.uk/CGI/man-cgi?readlink