Multiple choice technology operating systems

Consider the script "beach.sh" for i in \$1; do if (( ${#i} > 4 )); then print -n "#$i " fi done beach.sh "On the beach at night, stands a child with her father"

  1. #On the beach at night, stands a child with her father

  2. #On #the #at #a #with #her

  3. #beac #nigh #stan #chil #fath

  4. #beach #night, #stands #child #father

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The beach.sh script iterates over words in $1. ${#i} gives string length. Words longer than 4 characters get prefixed with '#'. From 'On the beach at night, stands a child with her father': 'beach'(5), 'night,'(6), 'stands'(6), 'child'(5), 'father'(6) qualify. Punctuation like comma in 'night,' counts as part of the word.