[ale] THANKS to all who replied to "ls -rt | rm -i" problem, BUT...ATTN:JoeKnapka

Stephen Cristol stephen at bee.net
Sun Mar 19 14:16:24 EST 2006

On Mar 19, 2006, at 1:22 PM, Geoffrey wrote:
> Paul Cartwright wrote:
>> On Sun March 19 2006 7:54 am, Geoffrey wrote:
>>> awk is the toy you want:
>>> rm -i $(ls -l | awk '/Mar 15/ {print $NF})
>> I'm not going to play around with awk and rm :)
> Well, I've played around with it a bit, but it's a bit uglier then I
> expected.  There's no easy way to escape the spaces in a file name  
> with
> awk in such a way that 'rm -i' will be happy.

What about using the -Q (aka --quote-name) switch for ls?

     ls -Q


More information about the Ale mailing list