Files
mastering-unix-ss/chapter27/function_read_input
Fabio Scotto di Santolo 4cc88d2f6e initial commit
2020-07-28 19:28:25 +02:00

20 lines
233 B
Plaintext
Executable File

read_input ()
{
# This function is used to save user input
LINE= # Initialize LINE to NULL
while true
do
read "ENTRY"
if [[ $ENTRY = 99 ]]
then
echo "$LINE"
break
fi
LINE="$LINE
$ENTRY"
done
}