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 foldergrep -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}' |
- find target files
- grep string in files, —ignore-case —only-matching —no-filename —perl-regexp
- turn capitalization
- duplicate removal