Re: Filtrar comodins/regex de le s línies

Xavier Drudis Ferran <[email protected]>
Newsgroups gmane.linux.debian.user.catalan
Message-ID <[email protected]>

El primer cas que demanaves sembla fàcil

grep -f fitxer_regexps.txt fitxer_nums.txt

Pel segon no sé cap comanda directa, potser alguna cosa tipus

#!/bin/bash
text=${1:-93123111}
fitxer_regexps=${2:-fitxer_regexps.txt}

for r in $(< "$fitxer_regexps") ; do {
   grep -qE "$r" - <<< "$text" && echo "$r" ;
} ; done


Però això podria ser més eficient si t'ho programes el perl o python o
el que sigui...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.