Skip to main content
formatting
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228
grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something. How
How can I do that? I appreciate your suggestion.

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something. How can I do that? I appreciate your suggestion.

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something.
How can I do that?

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awkawk in rel.logrel.log using xargsxargs or something. How can I do that? I appreciate your suggestion.

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something. How can I do that? I appreciate your suggestion.

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something. How can I do that? I appreciate your suggestion.

Source Link
user14039
user14039

xargs grep suggestion

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log

I need to search each of that MasterId/output of awk in rel.log using xargs or something. How can I do that? I appreciate your suggestion.