2009-05-05

Mehr von der mächtigen Linux-Command-Line



Hier die 2 Files:

stuff.csv:
1, a, joe@example.com  , e
2, b, jim@example.com  , f
3, c, sally@example.com, g
4, d, joe@example.com  , h

nostuff.csv
3, c, sally@example.com, g
Hier das Kommando:
for i in $(
      comm -23
           <( cut -f 3 -d , stuff.csv
              | sort -i
              | uniq -i )
           <(cut -f 3 -d , nostuff.csv
              | sort -i
              | uniq -i ))
> do
> grep -f -i "$i" stuff.csf | head -n 1
> done

0 Comments: