Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 76d0abd334
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.414 kb
#! /usr/local/bin/ruby
ZCAT = "/usr/local/bin/zcat"
LESS = "/usr/local/bin/less"
FILE = ARGV.pop
OPTION = (if ARGV.length == 0; "" else ARGV.join(" "); end)
if FILE =~ /\.(Z|gz)$/
exec(format("%s %s | %s %s", ZCAT, FILE, LESS, OPTION))
elsif FILE == nil
exec(format("%s %s", LESS, OPTION))
else
print(format("%s %s %s", LESS, OPTION, FILE), "\n")
exec(format("%s %s %s", LESS, OPTION, FILE))
end
exit()
Jump to Line
Something went wrong with that request. Please try again.