I have the following (example.txt) file:
blue(4) red(8) green(5) yellow(19) brown(60) black(5)
how can I achieve in unix the following result?
blue(4)
red(8)
green(5)
yellow(19)
brown(60)
black(5)
If you need to insert newline after closing brackets, try
sed 's/) \?/)\n/g' example.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With