Open target folder

by Rudd-O published 2008/11/11 19:05:00 GMT+0, last modified 2013-06-26T03:16:01+00:00

#!/bin/sh

#Open target folder
#by Manuel Amador (Rudd-O)
#under the GPL

quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)

eval "for a in $quoted ; do export b=\`readlink \"\$a\"\` ; nautilus \"\`dirname \"\$b\"\`\" ; done"