1833882 Members
1817 Online
110063 Solutions
New Discussion

grep question

 
SOLVED
Go to solution
iambluegary
Advisor

grep question

tsrad 62> ll
total 4
-rw-rw-rw- 1 pin pin 0 Apr 19 01:25 112002
-rw-rw-rw- 1 pin pin 0 Apr 18 22:50 200201
-rw-rw-rw- 1 pin pin 0 Apr 18 22:49 200204
-rw-rw-rw- 1 pin pin 0 Apr 18 22:50 200210
-rwxrwxrwx 1 pin pin 110 Apr 19 01:21 b
-rw-rw-rw- 1 pin pin 260 Apr 19 01:26 bb
-rw-rw-rw- 1 pin pin 0 Apr 19 01:31 user_fee_2002
tsrad 63>

now i wanna grep the file name begin with 2002,and put the ll output in a file:new

it's mean in file new,there should be:-rw-rw-rw- 1 pin pin 0 Apr 18 22:50 200201
-rw-rw-rw- 1 pin pin 0 Apr 18 22:49 200204
-rw-rw-rw- 1 pin pin 0 Apr 18 22:50 200210

and i wanna use command:
ll | grep ?????? >>new

how can i do it?
help ,help,help :-)
2 REPLIES 2
iambluegary
Advisor

Re: grep question

ll | grep ?????? >>new

should be:
ll | grep ?????? >new
help ,help,help :-)
Steven Sim Kok Leong
Honored Contributor
Solution

Re: grep question

Hi,

# ll 2002?? > new

Hope this helps. Regards.

Steven Sim Kok Leong