From ad0f7bd646607f7969aa202e1b5404ed1d200619 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Tue, 22 Mar 2022 12:00:55 +0100 Subject: [PATCH] Adding dependencies and known issues chapter --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d8adc0..af886e0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # readlink -Replicate `readlink -f` as bash script using mainly dependencies available on most bash 3 platforms. \ No newline at end of file +Replicate `readlink -f` as bash script using mainly dependencies available on most platforms: + +* `readlink` (without options) +* `cd` +* `pwd -P` +* `test -e` (as `[ -e ]`) + +# Known issues + +* When `readlink` is part of a pipe some links contain the current pipe described like `pipe:[123456]` where the number changes on every call. + `readlink` resolves these as valid links. + + e.g. + ``` + $ readlink -f /dev/stdout + /dev/pts/0 + + $ readlink -f /dev/stdout | cat + /proc/737861/fd/pipe:[2332393] + + $ ./rdlink.sh /dev/stdout + + ``` + Whereas `rdlink` is not able to evaluate such links, because the pipe is already invalid as soon as a expression like `result="$(readlink "${tocheck}")"` returns. \ No newline at end of file