I have the following bash code which loops through a text file, line by line .. im trying to prefix the work \'prefix\' to each line but instead am getting this error:
The entire loop can be replaced by a single sed command that operates on the entire file:
sed -e 's/^/prefix/' $file