View difference between Paste ID: gCrgk9m1 and vsPs9NPE
SHOW: | | - or go back to the newest paste.
1
bash-4.2$ ruby -e 'a=gets;a.split("").uniq.map{|x|puts"#{x} : #{a.count x}"}' <<< 'Hello world'
2
H : 1
3
e : 1
4
l : 3
5
o : 2
6
  : 1
7
w : 1
8
r : 1
9
d : 1
10
11
 : 1
12
13
bash-4.2$ echo 'Hello world' | ruby -e 'a=gets;a.split("").uniq.map{|x|puts"#{x} : #{a.count x}"}'
14
H : 1
15
e : 1
16
l : 3
17
o : 2
18
  : 1
19
w : 1
20
r : 1
21
d : 1
22
23
 : 1
24
25
bash-4.2$ echo -n 'Hello world' | ruby -e 'a=gets;a.split("").uniq.map{|x|puts"#{x} : #{a.count x}"}'
26
H : 1
27
e : 1
28
l : 3
29
o : 2
30
  : 1
31
w : 1
32
r : 1
33
d : 1
34
35
bash-4.2$ printf 'Hello world' | ruby -e 'a=gets;a.split("").uniq.map{|x|puts"#{x} : #{a.count x}"}'
36
H : 1
37
e : 1
38
l : 3
39
o : 2
40
  : 1
41
w : 1
42
r : 1
43
d : 1