Hi,
Please help me,
i need a single line command for te below steps
1: listing a directory
2: searching a particular pattern in the names and creating the zip files of each
eg :
ls -lrt | grep jil | awk '{print $9}'
output is
kap.jil
pranabjil
pranabjil1
pranabjil2
tmpjil12
a.jil
pppppp.jil
partyref.jil
kkkkkkk.jil
retjil.ksh
newjil
newprodjil.lt
newprodjil.box
newprodjil
xxxxxxxx.jil
xxxx.jil
tmpjil1
temp.jil
I am searching the pattern with jil. and i am getting the file name. I want the zip files of them.
Please advice me on this.
Thanks in advance.
Pranab Rana
---------- Post updated at 03:56 PM ---------- Previous update was at 03:55 PM ----------
got the answer
ls -lrt | grep jil | awk '{print $9}' | xargs gzip