I have some data which is being returned by some SQL query which looks as below.I am trying to separate the lines based on a delimiter and send it to the new line.How can I do this in UNIX.. I tried using shell-scripting but couldn't make through...
ALB|1001|2012-04-15 ALB|1001|2012-04-14 ALB|1001|2012-04-16 ALB|1001|2012-04-17
ALB|1001|2012-04-15
ALB|1001|2012-04-14
ALB|1001|2012-04-16
ALB|1001|2012-04-17
For that particular example, tr ' ' '\n' < file
ought to work:
echo "ALB|1001|2012-04-15 ALB|1001|2012-04-14 ALB|1001|2012-04-16 ALB|1001|2012-04-17" | tr ' ' '\n'
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