( kantal | 2018. 02. 12., h – 18:16 )

NO WARRANTY:-)


#!/bin/bash

DIR=$HOME/work
cd $DIR || { echo "Bad directory name" && exit 1 ; }

OLDIFS=$IFS
IFS=$'\n'
for syml in $(find . -type l ); do
    src=$( readlink -e "$syml" )
    if [ -n "$src" ] && ! [ -d "$src" ]; then
        echo Processing link [$syml] to [$src]
        ls -al "$syml" "$src" # test
        #rm "$syml"
        #cp "$src" "$syml"
    fi
done

--
eutlantis