(Intentionally using shell variable $0 ?)
>
>
> Thanks Barry!
>
You seem to have got your answer. So just one additional remark...
It has been mentioned that sort is unnecessary. You can also omit
the grep and the cut since you're using awk anyway; saves processes
and IPC. Assuming you have data like 12345678="somename"whatever
and want the 'somename' extracted, for example... (untested)
fgrep -hf <(
awk 'match($0,/"[^"]*"/) {print substr($0,RSTART+1,RLENGTH-2)}' "$0"
) "$file"
which picks the first quoted subexpression, or (to better reflect
your original code, but as your original code less robust) done with
sub-strings... (untested)
fgrep -hf <(awk -F\" '/="/ {$0=substr($0,11);print $1}' "$0") "$file"
Janis