summaryrefslogtreecommitdiff
path: root/toks-per-line
blob: 012caac3bc08497cf944427d4ce82bc42e5879c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env ruby

uniq = false
uniq = true if ARGV[0]

while line = STDIN.gets
  a = line.strip.split
  a.uniq! if uniq
  a.sort!
  puts a.join " "
end