Search content in files under folder

regular expression

1
/\bsys_.*?\b/

match words begin with sys_, as short as possible.

definite scope

1
find --name "*.xml" .

If you search directly under a folder
grep -r —recursive may more suitable.

turn lower to upper letter

1
tr "[:lower:]" "[:upper:]"

duplicate removal

1
awk '!a[$0]++{print}'

when current line not show in below, print it.

integration

1
find -name "*.xml" | xargs grep -iohP '\bsys_.*?\b' | tr "[:lower:]" "[:upper:]" | awk '!a[$0]++{print}'
  1. find target files
  2. grep string in files, —ignore-case —only-matching —no-filename —perl-regexp
  3. turn capitalization
  4. duplicate removal