Convert multi lines to single line with spaces and quotes
It can be done with awk
awk '{printf("\"%s\" ",$0)} END { printf "\n" }' databases.txt
Output:
"Wp_new" "Frontend DB" "DB_EXT"
With sed + paste
$ sed 's/.*/"&"/' databases.txt
"Wp_new"
"Frontend DB"
"DB_EXT"
$ sed 's/.*/"&"/' databases.txt | paste -sd' ' -
"Wp_new" "Frontend DB" "DB_EXT"
Or, just paste
(courtesy https://unix.stackexchange.com/a/593240)
$ <databases.txt paste -d '"' /dev/null - /dev/null | paste -sd' ' -
"Wp_new" "Frontend DB" "DB_EXT"
If input has empty lines that should be ignored:
$ cat ip.txt
Wp_new
Frontend DB
DB_EXT
$ sed -n 's/..*/"&"/p' ip.txt | paste -sd' ' -
"Wp_new" "Frontend DB" "DB_EXT"
$ awk '{printf "%s\"%s\"", sep, $0; sep=OFS} END{print ""}' file
"Wp_new" "Frontend DB" "DB_EXT"