#!/bin/bash # seuraa - seuraa symlinkkejä kunnes vastaan tulee oikea binääri p=`which $1` while [ -h $p ]; do ls -l $p p=`readlink $p` done ls -l $p