Now I need to execute the below command to check whether the above numbers are present in an another file. And whatever numbers are not present, I need capture those numbers.
For example
zgrep "|50|" sample.dat.gz
Can you please help me to do this in a shell script? Thanks for the help !
The v option is used to display only non matching lines, the f option lets you specify a file for the patterns and the w option tells grep to match only whole words (without it 4 would match 45).
If you need to work at a specified field level you need to be more explicit about what fields contain the data you want. This works for linux and only on whole records in the .gz file