#!/bin/sh rm -f racines unseuldépendant touch unseuldépendant racines while read j; do k=$(echo $j|sed "s@-[^-]*-[^-]*-[^-]*$"@@) echo $k find /repo/x86_64/slint-15.0/slint -name "*dep"|while read i; do if grep -q "$k" "$i"; then echo "$i" >>"$k" fi done if [ ! -f "$k" ];then echo "$k" >> racines else n=$(wc -l "$k"|cut -d" " -f1) if [ "$n" -eq 1 ]; then d=$(cat "$k") if ! grep -q "$d" unseuldépendant; then cat "$k">> unseuldépendant fi fi fi rm -f "$k" done < slint