6 examples for wc

{{ score }}
  # count the number of lines in a file
wc -l [file ...]
        
{{ score }}
  # Find the length of the longest line in a file, good for <80 char checks
wc -L code.txt
        
{{ score }}
  # count the number of words in a file
wc -w my_file.txt
        
{{ score }}
  # Count the number of lines of all files in a directory
find path/to/dir | xargs wc -l
        
{{ score }}
  # Get the number of characters in a line
echo "hello world" | wc -m
        
{{ score }}
  # count the words in a file
wc -w