A one-liner that would do the job is (not tested)
perl -ne '@a=split('\|',$_,3);pop;print join('|',@a)."\n";' <file
But it helps tremendously if you learn a bit of Perl to understand what's going on. Just copying and pasting a solution is a very dangerous thing.
In reply to Re: formating data input
by talexb
in thread formating data input
by manu7495
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |