>_ IzzyLab

Topic breakdown

A here-string <<< feeds a string directly to a command's standard input — a compact replacement for the echo string | command combination, and without spawning an extra process or a pipeline subshell. Many utilities (for example wc counting words) read exactly stdin, so this way of passing data is natural for them. The task teaches passing a script's argument into a command via a here-string and remembering that its output may contain leading spaces.

What's checked

  1. word count via here-string
  2. wc.sh uses a here-string

What it looks like