cat /usr/local/error.log| awk '{print $(NF-1)}' | bash cuowu

cat cuowu

#!/bin/bash

while read a;do

grep $a /usr/local/right.log

done