Come sottrarre un set da un altro in Bash?Bash set sottrazione
Questo è simile a: Is there a "set" data structure in bash? ma differente in quanto chiede come eseguire la sottrazione, con il codice
- set1: N linee come uscita da un filtro
- set2: M linee come uscita da un filtro
come ottenere:
- set3: con tutte le linee di N che non compaiono i n M
c'è un errore in questo articolo comm non funziona correttamente con sort -n, ad esempio: comm <(sort -n <<< 4 $ '\ n'55 $' \ n'7) <(sort -n <<< 2 $ '\ n'55 $' \ n'8) –
Questa è una risposta solo per collegamento. – YSC