dev/bash/ld_symlinks/tmp3.sh

13 lines
265 B
Bash
Executable File

#!/bin/bash
for baselib in "$@"
do
shortlib=$baselib
while extn=$(echo $shortlib | sed -n '/\.[0-9][0-9]*$/s/.*\(\.[0-9][0-9]*\)$/\1/p')
[ -n "$extn" ]
do
shortlib=${shortlib%$extn}
echo ln -s $(basename $baselib) $shortlib
done
done