Hello friends
i have a file that outputs like this:
lineA
lineB
lineC
I would like it to format it like this as output:
'lineA','lineB','lineC'
Can you help?
Thank you
Hello friends
i have a file that outputs like this:
lineA
lineB
lineC
I would like it to format it like this as output:
'lineA','lineB','lineC'
Can you help?
Thank you
Hello DallasT,
Considering that your actual Input_file is same as shown sample Input_file, could you please try following and let me know if this helps you.
awk -v s1="'" -v s2="," 'val{printf s1 val s1 s2;} {val=$0} END{printf s1 val s1 RS}' Input_file
Thanks,
R. Singh
Worked beautifully my friend.
thank you!