I'd do this in Perl:
$ perl -lne 'printf "\"http://$_\","' file | sed 's/,$/\n/'
-l removes newline characters from the end of each line (also adds a
\n to each
print call which is why I'm using
printf instead). The
-ne means "run the script given by
-e on each line of the input file. The script itself will print
"http://, the current line (
",. Then, the
sed removes the final trailing comma.
Alternatively, you could do:
$ sed 's#^#"http://#;s#$#"#' file | tr "\n" "," | sed 's/,$/\n/'
Here, the 1st
sed will replace the beginning of each line (
"http://, and the end of each line (
$) with a
tr replaces each newline character with a comma and the 2nd
sed removes the last trailing comma.