Grimoire-
Command
.es

GNU+Linux command memo

Count lines of code longer than 79 characters

shell Python code

Compter le nombre de lignes d’un programme qui dépassent une certaine taille

Usage :

$ grep -r '.\{79\}' *.py | wc -l
$ rg .{79} -t py | wc -l

It may help to decide which limit you want to set.

Results for a 3397 lines project (with a wanted limit at 96) :

79 -> 283
80 -> 256
85 -> 147
88 -> 84
90 -> 55
92 -> 26
95 -> 7
96 -> 4
98 -> 1

To get the total number of lines I used :

$ wc -l *.py

Selection

  • Check SSD remaining lifetime
  • Save data from lost partition
  • Cipher external Android SDcard
  • Recommanded Firefox addons
  • doc_crawler.py : Extract site PDFs
  • 20 mémos "ligne de commande"
  • [Mémo 8] compression de fichiers
  • [Mémo 10] explorer le matériel
  • Tectonique de la pâte thermique
  • Doc. AsciiDoctor en français
  Articles | Command.es | Mémos

Themes  

  • Artix
  • Debian
  • Fairphone
  • Firefox
  • Git
  • JavaScript
  • KVM
  • Memo
  • Nim
  • Python
  • SSH
  • Tor
  • Xorg
  • adminsys
  • android
  • asciidoc
  • benchmark
  • bluetooth
  • code
  • comfort
  • compression
  • database
  • date
  • game
  • hardware
  • install
  • metadata
  • mount
  • music
  • mutt
  • network
  • optimize
  • regex
  • repair
  • security
  • shell
  • storage
  • vim

Sponsor

Meta-Press.es: search-engine

Liberapay   Patreon

Support via BTC 12z7pK5YFcmG7PGJ985dFtnRzwtxDVDmwc

A propos  Flux