I use the following command:
xargs -I{lin} echo \"{lin}\" < your_filename
xargs accepts standard input (redirected from your file) and passes one line of time to the {lin} placeholder, and then runs the following command, in this case a echo with escaped double quotes.
You can use the -i option for xargs to omit the placeholder name, for example:
xargs -i echo \"{}\" < your_filename
In both cases, your IFS should be the default or '\n' at least.
source share