From: "Dimitry V. Ketov" <Dimitry.Ketov@avalon.ru> To: ALT Devel discussion list <devel@altlinux.ru> Subject: [devel] Q: Поиск целевого файла в цепочке символических ссылок Date: Sun, 20 Mar 2005 15:25:06 +0300 Message-ID: <423D6BA2.3090402@avalon.ru> (raw) Решить задачу _существующими_ средствами не смог, возможно изобрел велосипед, хочу критики (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 }
next reply other threads:[~2005-03-20 12:25 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-03-20 12:25 Dimitry V. Ketov [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=423D6BA2.3090402@avalon.ru \ --to=dimitry.ketov@avalon.ru \ --cc=devel@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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