#!/bin/sh
file="output.txt"
cat /dev/null > $file
echo "Whatever you write will go into a file called $file located in the same"
echo "Directory as this script. Type the word exit to end writing"
while read line
do
if [ $line = "exit" ]
then
break
else
echo $line >> $file
fi
done