#!/usr/bin/env bash # -l counts lines printf '%s\n' "one two" "three four five" | wc -l # -w counts words printf '%s\n' "one two" "three four five" | wc -w
count lines and words