Skip to main content
deleted 4 characters in body
Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

With , without any shell pipes (quicker) :

$ perl -lne '/\d+(?:-)/ and $h{$&}++;END{print scalar keys %h}' file

With , without any shell pipes (quicker) :

$ perl -lne '/\d+(?:-)/ and $h{$&}++;END{print scalar keys %h}' file

With , without any shell pipes (quicker) :

$ perl -lne '/\d+-/ and $h{$&}++;END{print scalar keys %h}' file
added 5 characters in body
Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

With , without any shell pipes (quicker) :

$ perl -lne '/\d+(?:-)/ and $h{$&}++;END{print scalar keys %h}' file

With , without any shell pipes (quicker) :

$ perl -lne '/\d+/ and $h{$&}++;END{print scalar keys %h}' file

With , without any shell pipes (quicker) :

$ perl -lne '/\d+(?:-)/ and $h{$&}++;END{print scalar keys %h}' file
deleted 6 characters in body
Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97

With , without any shell pipes (quicker) :

$ perl -lne '/^\w+\K\d+\d+/ and $h{$&}++;END{print scalar keys %h}' file

With :

$ perl -lne '/^\w+\K\d+/ and $h{$&}++;END{print scalar keys %h}' file

With , without any shell pipes (quicker) :

$ perl -lne '/\d+/ and $h{$&}++;END{print scalar keys %h}' file
Source Link
Gilles Quénot
  • 36.8k
  • 7
  • 76
  • 97
Loading