Skip to content

Instantly share code, notes, and snippets.

@gouf
Created December 20, 2013 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gouf/8052439 to your computer and use it in GitHub Desktop.
Save gouf/8052439 to your computer and use it in GitHub Desktop.
ターミナルとかでファイルの削除リストを提示された時に使う。
str = <<PASTE
/usr/local/lib/pkgconfig/libcdt.pc
/usr/local/lib/pkgconfig/libcgraph.pc
/usr/local/lib/pkgconfig/libgvc.pc
/usr/local/lib/pkgconfig/libgvpr.pc
/usr/local/lib/pkgconfig/libpathplan.pc
/usr/local/lib/pkgconfig/libxdot.pc
/usr/local/lib/pkgconfig/osxfuse.pc
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a
PASTE
str.split("\n").map(&:chomp).each do |file|
system("rm -f #{file}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment