|
split line when found newline
Hi ,
I have below problem and needs your advice,
i have a file a.txt as below
12|romario|ronaldo|robert
23|aaa|bbb|haaa
000000002
There is no issues when i open this file in window,it will sows as it is.
in Unix:
i want the last record into seperate file.
So i used
$ tail -1 a.txt > b.txt
Output shows(b.txt) that
23|aaa|bbb|haaa
000000002
There is no carriage return?
how to split these line into 2 seperate lines when i suing Shell scripts.
Thanks and Regards,
Hari
|