[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
?maybe? RFE?... read -h <symlink>?
From: |
L A Walsh |
Subject: |
?maybe? RFE?... read -h <symlink>? |
Date: |
Sat, 04 Sep 2021 16:18:09 -0700 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
I know how -h can detect a symlink, but I was wondering, is
there a way for bash to know where the symlink points (without
using an external program)?
Like if I'm running a script and check if something
is a symlink to a dir that isn't there, is there a way
to read the value of a symlink like a "read -h":
chk_val_bin_bash_lnk () {
if ! [[ -f /bin/bash ]]; then
if [[ -h /bin/bash ]]; then
read -h target /bin/bash
if [[ $target == /usr/bin/bash ]]; then
/bin/mount /usr
return 0
fi
fi
fi
return 1
}
- ?maybe? RFE?... read -h <symlink>?,
L A Walsh <=
- Re: ?maybe? RFE?... read -h <symlink>?, Greg Wooledge, 2021/09/04
- Re: ?maybe? RFE?... read -h <symlink>?, Dale R. Worley, 2021/09/05
- Re: ?maybe? RFE?... read -h <symlink>?, Lawrence Velázquez, 2021/09/05
- Re: ?maybe? RFE?... read -h <symlink>?, felix, 2021/09/06
- Re: ?maybe? RFE?... read -h <symlink>?, Alex fxmbsw7 Ratchev, 2021/09/06
- Re: ?maybe? RFE?... read -h <symlink>?, Alex fxmbsw7 Ratchev, 2021/09/06
- Re: ?maybe? RFE?... read -h <symlink>?, Greg Wooledge, 2021/09/06
- Re: ?maybe? RFE?... read -h <symlink>?, Alex fxmbsw7 Ratchev, 2021/09/06
- Re: ?maybe? RFE?... read -h <symlink>?, felix, 2021/09/06