[kde-linux] opening linked files
linux_milano at yahoo.it
Sun Jul 29 23:15:24 UTC 2007
Anne Wilson wrote:
> I am not a programmer, so this may be utter nonsense, but here are my
> thoughts. The path for any file is in its properties, so it should be
> possible to get the path and assign it to a variable, which can then be
> used in your script to perform the required act, if examination of the
> passes the test. Does that sound right?
Thank you for all replies, that helped to devise a script to open files (lyx
files in my case) in their actual directory.
Here included my script, to be associated to .lyx files
if [ ! -h $1 ];then
if [ -f $1 ];then # it is a regular file
elif [ -d $1 ];then
echo $inp " is a directory"
echo $inp "not a regular file"
elif [ -h $inp ]; then # it is a symbolic link
file=$(readlink -f "$inp")
(cd $fpath && $open $fname)
More information about the kde-linux