Challenge: Write a shell script to accept multiple lines of copied text and store these text lines in a shell variable.
Example text to be copied and pasted:
Code:
Europe
=======
Amsterdam
Brussels
Copenhagen
Africa
======
Tunis
Cairo
The empty lines must be preserved! Only exception are the lines after 'Cairo', these should not be copied and thus also not pasted into the variable.
I wrote a script myself, but wonder how somebody else would do it. After at least one person submitted a script, I will share mine here too.