ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Q: Поиск целевого файла в цепочке символических ссылок
@ 2005-03-20 12:25 Dimitry V. Ketov
  2005-03-20 12:31 ` Dmitry V. Levin
  0 siblings, 1 reply; 12+ messages in thread
From: Dimitry V. Ketov @ 2005-03-20 12:25 UTC (permalink / raw)
  To: ALT Devel discussion list

Решить задачу _существующими_ средствами не смог, возможно изобрел велосипед, хочу критики 
(readlink не входит в SUSv3, чем заменить?)

Д.
----------------------
findtarget()
{
     path="$1"

     while [ -L $path ]
     do
       linktarget=`readlink $path`

       case $linktarget in
           /*) path=$linktarget ;;
           *) path=`dirname $path`/$linktarget ;;
       esac
     done
     echo $path
}


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-03-21  7:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-20 12:25 [devel] Q: Поиск целевого файла в цепочке символических ссылок Dimitry V. Ketov
2005-03-20 12:31 ` Dmitry V. Levin
2005-03-20 12:48   ` Dimitry V. Ketov
2005-03-20 12:56     ` Dmitry V. Levin
2005-03-20 13:03       ` Dimitry V. Ketov
2005-03-20 16:13         ` Dmitry V. Levin
2005-03-20 17:26           ` Alexander Bokovoy
2005-03-20 17:36             ` Andrey Rahmatullin
2005-03-20 18:59               ` Alexander Bokovoy
2005-03-21  7:04                 ` Dimitry V. Ketov
2005-03-20 17:38             ` Dmitry V. Levin
2005-03-20 18:25               ` Alexander Bokovoy

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git