2 # Showing one possible way of doing multiline input
13 while readline
; do true
; done |
(
14 echo "Enter your message, ending with a line consisting of a single dot."
15 # dot-stuff as in RFC 5321: to input a line starting with a literal dot,
17 message
="$(sed -n '/^\.$/q;s/^\.//;p')"
18 echo "You wrote the following $(echo "$message"|wc -l) line(s):"