How can I convert multi lines to a single line with spaces and quotes
using awk
or tr
or any other tool which makes it simple
(but not for
loops)?
$ cat databases.txt
Wp_new
Frontend DB
DB_EXT
Expected:
$ cat databases.txt
"Wp_new" "Frontend DB" "DB_EXT"
Edit 1:
Thanks for all the useful answers. But the one I marked as correct is the one which can be typed on terminal in short time and with fewer hassles (simplicity) so that I(syadmins) can do the operations very fast without making the systems downtime more.