|
|
| Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 13 Location: Chennai
|
|
|
|
I have input file like from column 1-80 is one part and 80 to 160 is another part
| Code: |
Karan
Mohan
Mohan 1234
Sumit
Sumit 5648
|
I want my output file as
| Code: |
Karan
Mohan 1234
Sumit 5648
|
Checking for part from 80-160, if it is spaces then
I have to check in next line whether part 1 to 80 is same, and if it is same I have to write second line not the first.
And if it is not same then I have to write first line
Can anyone help me on this |
|
| Back to top |
|
 |
References
|
Posted: Mon Jun 23, 2008 3:37 pm Post subject: Re: I want to copy data from previous line to new line |
 |
|
|
 |
cvadlamudi
Active User
Joined: 19 Apr 2007 Posts: 54 Location: India
|
|
|
|
Hi,
Sort the file first using
Sort fields=(1,80,ch,a,81,80,ch,a).. this will bring the records with the spaces first...
and remove all the first duplicate records |
|
| Back to top |
|
 |
ssk1711
New User
Joined: 16 Jun 2008 Posts: 29 Location: bangalore
|
|
|
|
hi Raghul,
| scorp_rahul23 wrote: |
| I have input file like from column 1-80 is one part and 80 to 160 is another part |
can you be bit clear on this statement. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1504 Location: germany
|
|
|
|
scorp_rahul23,
could there be three records with the same 1-80;
1st is spaces 81-160
2nd is filled 81-160 fill = abc
3rd is filled 81-160 fill = def
?????????? |
|
| Back to top |
|
 |
|
|