Operating System - HP-UX
1834817 Members
2687 Online
110070 Solutions
New Discussion

inserting "NA" between pipes

 
Pando
Regular Advisor

inserting "NA" between pipes

Dear Gurus,
I would like to seek help in inserting "NA" in between the the pipes inside the file using perl command.
Inside the file, i have something like this...

25.0|0|-1|RE641|1|00001|| 1234.....
25.0|0|-1|RE654|1|00001|| 2564.....

i want the the output to be :

25.0|0|-1|RE641|1|00001|NA| 1234.....
25.0|0|-1|RE654|1|00001|NA| 2564.....

I would appreciate a single one line command using perl.

Maximum points to all correct replies.
1 REPLY 1
Pando
Regular Advisor

Re: inserting "NA" between pipes

I have found the solution.
thanks!