Merci.
On oubli trop souvent awk. Peut être parce que ça gère les lignes indépendament, mais c'est ce que je veux
On Thu, 2023-08-10 at 00:07 +0200, l0f4r0@tuta.io wrote:
Hello,
Pas besoin de regex.
awk '{ for(i=2;i<=NF;i++) { if($i!="deleted") { for(j=i+1;j<=NF;j++) { if($i==$j) { $j="deleted" } } } }; for(i=1;i<=NF;i++) { if($i!="deleted") { printf "%s ",$i }; if (i==NF) { printf "\n" } } }' input.txt
l0f4r0 _______________________________________________ tech mailing list tech@lists.parinux.org https://lists.parinux.org/listinfo/tech