fork download
  1. #!/bin/bash
  2. var="one two three four giberish-giberish five giberish-giberish six"
  3. awk 'BEGIN{RS=ORS=" "} length($0) <= 6' <<< "$var"
  4.  
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
one two three four five six