Quote:
Originally Posted by ali560045
need help in a command. My requirement is that i m grepping the filename based on a pattern in .tar.gz file and then copying the file into some dir
below is what exactly i want to achieve
step 1: grep -l '30017A6800022D1A' CurrentCollectorMeterReadBackup20081007.tar.gz
step 2: file found should be copied to dir nav/files
How to achieve the above steps without unzipping the file ? Plz help me in this
|
Code:
zcat CurrentCollectorMeterReadBackup20081007.tar.gz | grep -l '30017A6800022D1A' && cp CurrentCollectorMeterReadBackup20081007.tar.gz nav/files/