1337 programming by Matrox (Part 1)
Currently I'm rewriting the whole install script for the Parhelia drivers and while looking at the sourcecode,
I found a very nice code snippet by some 1337 hacker @Matrox, here we go:
# parse data
for ((LOOP=1; LOOP <= LENGTH; LOOP++))
if [ "$VALUE" == "libstdc++.so.6" ]; then
What is this code supposed to do?
Let me help you: It evaluates the `ldd` output of a previously compiled binary to see wheter the
system links to libstdc++.so.6 or any previous version by starting at the first byte and looking for
the 14 bytes long string "libstdc++.so.6" from this position on until the end of data (-14, of course,
the length of the string "libstdc++.so.6".
How can I help making life easier? Well, let's try this one:
if ldd $CONFAPP_BIN | grep -q libstdc++\.so\.6; then
To be continued...