Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

GOLF TIEM

Name: Anonymous 2010-11-12 18:57

Quick! You have 5 minutes to write something awesome in 10 lines of ruby or less!

Name: Anonymous 2010-11-12 21:22

>>6
A filename can't contain "/" (or NULL so $0 wouldn't ever be "-rf /*". Not sure what you're doing there.

The easiest fix would be calling rm with "--" as first argument and wrapping $0 in quotation marks to pass it as one argument to rm in case there is a space in the filename.

Like so:

exec "rm -- '$0'"

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List