I'm trying to write a bash script that asks for input then writes it to a file.
echo "What would you like to write to that file?"
read writing
writing >> $file.txt
I tried doing something like this but it didn't work.
CodePudding user response:
You could try
echo $writing >> $filename