I want to perform operations on the files found by the find command which already has a -exec option.
find . -type f -exec zgrep -li "4168781103" {} +
Output:
./results/Query_20200501_18_32_00_msisdn_14168781103_detail.csv
./results/Query_20200501_18_32_02_msisdn_14168781103_summary.csv
./results/Query_20200501_18_32_02_msisdn_14168781103_detail.csv
./results/Query_20200501_18_32_04_msisdn_14168781103_summary.csv
./results/Query_20200501_18_32_04_msisdn_14168781103_detail.csv
./results/Query_20200501_18_32_51_msisdn_14168781103_summary.csv
./results/Query_20200501_18_32_51_msisdn_14168781103_detail.csv
./results/Query_20200501_18_36_03_msisdn_14168781103_summary.csv
./2311/2020_05/01/18/2311.TRL_20200501180400114.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/trlindex.db
./2311/2020_05/01/18/2311.TRL_20200501180500115.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501180600116.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501180700117.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501181000118.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501183000119.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501183100120.c.5.3.38.0.trl.gz
./2311/2020_05/01/18/2311.TRL_20200501183200121.c.5.3.38.0.trl.gz
./2323/2020_05/01/18/2323.TRL_20200501180400296.4.3.18.0.trl.gz
I found these files containing the key string 4168781103 using find with -exec option, Now i want to print the contents of all the files found below ending with file name .trl.gz only or run a search on these files....