Logo

GitLab

Sign in

Wojciech Jaworski / ENIAM

  • Back to Dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
validation
  • ENIAM
  • frequency
  • count.sh
  • Frequency list: fixed tabs being erroneously replaced with spaces in the final list.
    2a373b5d
    Jan Lupa authored
    9 years ago  
    Browse Code »
count.sh 196 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10
#!/bin/bash

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

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