[Peter Stephenson] > Haakon Riiser wrote: > > So I'll just have to resolve the symlink using readlink. I assume > > the most portable way to do this is perl, unless there is a way > > to make zsh expand the link itself. I have attached a version that > > does this. Should handle any level of symbolic links that point to > > new symbolic links. > > You can use the zsh/stat library. > > zmodload -i zsh/stat > stat -A ln +link ~/perforce > print $ln[1] > /pws/perforce Thanks, but I did away with that completely. There's really no need to think about symblic links and the version file when the version number actually is embedded in the ACROREAD-PREFIX/bin/acroread script. Attached to this mail is the latest version that only runs acroread -help to determine the patch to the real executable when the version number was not found directly in $command[$words[1]]. By the way, it uses "sed -n 's/^ver=//p' FILE" to extract the version. Is it preferable to use zsh's own string functions to do this? The code tends to become quite hard to read, and I usually need to spend much more time writing it than when I use sed or awk. -- Haakon