help on grep command...

Hi

I have lots of file in on folder and i want to egrep from only few files.

List of files......

Polt_KJ_430_OutputRBS_istUt_CR2.log
Polt_KN_4122_OutputRBS_ncChk_CR.log
Polt_LN_2230_OutputRNC_Hth_CLKLKL.log
Solt_KJ_430_OutputRBS_istUt_CR2.log
Solt_KN_4122_OutputRBS_ncChk_CR3.log
Solt_LN_2230_OutputRNC_Hth_CR4.log

i want egrep only few files which file name have solt anf Hth.

Solt_LN_2230_OutputRNC_Hth_CR4.log

I know few egrep command but it can work only one criteria

egrep -i 'LO|EED|Tal|%' *Hth*.log> /home/put/TKN_0012.txt

Thanks.....

Just add the prefix to your file specification:

egrep -i 'LO|EED|Tal|%' Solt*Hth*.log> /home/put/TKN_0012.txt
1 Like

Thanks a lot............:):):):):):):slight_smile: