10-line Ruby FTP client
An example of why I like Ruby. This could be shortened further.
#!/usr/bin/ruby require 'net/ftp' ftp = Net::FTP.new(*ARGV) while ! ftp.closed? do begin puts ftp.send(* STDIN.gets.strip.split(/\s+/)) rescue puts "Command failed, oops." end end
