I have a file. The file contain as follows :
I want the output looking like:
Please help me. I want the script which count "~ this combination of character equal to 6 then print new line.
I have a code.
cat filename | tr -d '\n' | sed 's/\([^"\~]*"~[^"\~]*"~[^"\~]*"~[^"\~]*"~[^"\~]*"~[^"\~]*"~\)/\1\n/g'
But this code not working.
Please help me
Thanks in advance