Yes, the character following the s command becomes the separator.
Usually one takes the / but here it conflicts with the / in the regexp and substitution strings.
I think that # would look nicer than @
Code:
sed -e 's#/lib\(64\)\?\(32\)\?/ld#/tools&#g' \
-e 's#/usr#/tools#g' $file.orig > $file
The & in the substitution string means "all that matched".
I think they mean
lib optionally followed by either
64 or
32, so the following is more correct
Code:
sed -r -e 's#/lib(64|32)?/ld#/tools&#g' \
-e 's#/usr#/tools#g' $file.orig > $file