Database.txt
John:30:40
echo -n "New Title Please :"
read NewTitle
awk -F":" 'OFS = ":"{ $1 = "'$NewTitle'" ; print $0 } ' Database.txt> Database2.txt
mv Database2.txt Database.txt
what this does, is that when i input something into $NewTitle, it will update $1 which is "John" into the input which i key in earlier.
the problem i am having is that when i input a single line like "mark" into $NewTitle ,the thing is updated properly , but when i input a string such as "mark twain" , i will receive an error saying
awk: line 1: runaway string constant "ffe ...
what does this mean and how do i solve it?