I'm trying to replace all my spaces with commas to use my file as a CSV input, here is a sample input:
[Royal Gauntlets of Silvermoon] (1) Senhna 2500g
[Chestguard of the Vanquished Hero] (1) Neithia 3000g
[Chestguard of the Vanquished Hero] (1) Buddafly 3000g
and here is my expected output:
[Royal Gauntlets of Silvermoon],(1),Senhna,2500g,
[Chestguard of the Vanquished Hero],(1),Neithia,3000g,
[Chestguard of the Vanquished Hero],(1),Buddafly,3000g,
tr ' ' ',' <input >output
works but replaces my spaces in the brackets as well
I know I can do this with awk but I'm unsure as to how exactly to do it. Thanks!