I am working with a file that has some of the records broken into several lines, I need paste the pieces back into one line. All records should start with numeric id, and presently all lines do start with id. The last field of the record is "telephone", so I need to make sure that each line starts with id and ends with telephone field.
To illustrate see below current file:
I need to change it into this:
Here is what I tried:
but result is one long line
10 name ABC address 123 MAIN ST telefone 123-123-1234 11 name PQR address 234 GREEN AV telefone 234-234-2345 12 name XYZ address 123 MAIN ST telefone 345-345-3456
I can't figure out the problem with my code.
Any suggestions would be appreciated.
Hi,
I have a major problem in my source files. I have around 10 source files(around 20 GB).In one of the source files I am getting the broken line issue.My source files needs to be like this
Sr.No~Ref.No~Address~Acc.No
1~ABC345~No.2/110~456474
2~ABC786~4w/54~458695
... (4 Replies)
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Hi,
I have a very huge file, around 1GB of data.
I want to remove the newline characters in the file but not preceded by the original end delimiter {}
sample data will look like this
1234567
abcd{}
1234sssss
as67
abcd{}
12dsad3dad
4sdad567
abcdsadd{}
this should look like this... (6 Replies)
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
2eleven
2twelve
1thirteen
2fourteen
The output should be: (5 Replies)
Hi,
I have a input file with the following entries:
1one
2two
3three
1four
2five
3six
1seven
1eight
1nine
2ten
The output should be
1one
2two
3three
1four
2five
3six (2 Replies)
Hello, I have a script like follows. It reads a file, and with every line, it calls an "adapter" program, which just puts the line into MQ. When I run this locally, it works fine. When I run this on our company's server, one line is split into several pieces (99 characters long) and "adapter"... (1 Reply)
I generally use yy to copy a line and then p to paste the line at end of current line.
But is there a way to paste the copied line in concatenation with the current line with out going to next line. (3 Replies)
Hi everyone, I've never used Unix ever in my life and I just got a summer job that requires me to manipulate Unix =(
I'm currently encountering a problem...
I need to search for Keyword in a text file, and if I find Keyword , I'll have to output the whole line that contains Keyword into a new... (4 Replies)