I am trying to make a new file from an existing file, input.txt, using Unix commands.
File input.txt
type ABC=home,3,test,data
type EFG=data,2,test_new,data_load
type PQR=load,2,test_type,data_loader
Expected output.txt
Name,number
ABC,3
EFG,2
PQR,2
I am trying with
input.txt | awk -F" "'Print $2' | awk -F","'Print $2' > output.txt
But I am not getting the expected result. How can I fix it?