I have a file
cat test.txt
name: amit
phone: 0000000000
I am trying to display like
name,phone
amit, 000000000
I try
cat test.txt | awk -F":" '{print $1}' | sed -n 's/,$//p'
and
cat test.txt | awk -F":" '{print $1}' | tr '\n' ,
then save 1st string in CSV
and then another by >>
when I use
cat test.txt | awk -F":" '{print $1}'
it shows
name
phone
my sed
or tr
is not wokring.. where I am doing wrong...