Blame view

NKJP/frequency/superscript1.sh 190 Bytes
Jan Lupa authored
1
2
3
4
5
6
7
8
9
#!/bin/bash

if [ $# -lt 2 ]
then
  echo 'Please provide an input and an output file.'
  exit 1
fi

export LC_COLLATE=C
Jan Lupa authored
10
sort "$1" | uniq --count | sed -E 's/( )*([0-9]+) (.*)/\3	\2/' > "$2"