I've found the following in a regular expression:
s/.*\`\(.*\)'/\1/g
I'm wondering what the grave accent means. I have only a very basic understanding of regular expressions, so I tried to look it up, but a basic search didn't lead me to anything useful.
The context: I'm trying out the accepted answer to this question: An error building Qt libraries for the raspberry pi
It suggests running the following script to adjust simlinks:
find . -maxdepth 1 -type l | while read i;
do qualifies=$(file $i | sed -e "s/.*\`\(.*\)'/\1/g" | grep ^/lib)
if [ -n "$qualifies" ]; then
newPath=$(file $i | sed -e "s/.*\`\(.*\)'/\1/g" | sed -e "s,\`,,g" | sed -e "s,',,g" | sed -e "s,^/lib,$2/lib,g");
echo $i
echo $newPath;
sudo rm $i;
sudo ln -s $newPath $i;
fi
done
However, it doesn't do anything, so I'm trying to understand how it is supposed to work.
The find
finds a lot of files, an example:
./libcap-ng.so.0
./libnettle.so.4
./libSDL-1.2.so.0
./libwebpmux.so.1
./libnss_nisplus.so
./libavahi-gobject.so.0
./libgdk-3.so.0
./librsvg-2.so.2
./libatk-bridge-2.0.so.0
./libgeoclue.so.0
./libdv.so.4
./libcdda_interface.so.0
./libheimbase.so.1
./libfontconfig.so.1
./libXinerama.so.1
./libopenal.so.1
./libicule.so.52
./libaudio.so.2
./libmplex2-2.1.so.0
and so on for dozens of other files, but none of them seem to "qualify" for the regex.