Beware xargs security holes

Alex Martelli staff at cadlab.sublink.ORG
Mon Oct 29 20:15:00 AEST 1990


bhoughto at cmdnfs.intel.com (Blair P. Houghton) writes:
	...
>>find / -name '#*' -print | egrep -v '.*/#[^/]*' | xargs rm -f --
>Lose the -v, dimwit.

Won't "egrep '/#'" pass EXACTLY the same lines as "egrep '.*/#[^/]*'"???
After all, it's not as if the RE had to match ALL of the incoming line!
Yours for simpler, more regular expression of Regular Expressions...
-- 
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 45, Bologna, Italia
Email: (work:) staff at cadlab.sublink.org, (home:) alex at am.sublink.org
Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434; 
Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).



More information about the Comp.unix.shell mailing list