Here is the syntax highlighting cat, which I shall call cax. #!/usr/bin/env ruby require 'syntax/convertors/html' require 'rainbow' filename = ARGV[0] puts ARGV[0] line_num=0 tokenizer = Syntax.load "ruby" file = File.new(filename,"r") while (line = file.gets) c_line = "" tokenizer.tokenize( line ) do |token| case token.group.to_s when "string" then c_line = c_line + token.color(:green