Re: Comparing values of two consequent lines

2018-03-29 Thread Tim Chase
On 2018-03-29 20:34, tu...@posteo.de wrote: > On 03/29 06:55, Tim Chase wrote: > > On 2018-03-29 06:21, Tim Chase wrote: > > > > I want to check, whether all paired lines have attached > > > > the same value. > > > > > > /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@! > > > >

Re: Comparing values of two consequent lines

2018-03-29 Thread tuxic
On 03/29 06:55, Tim Chase wrote: > On 2018-03-29 06:21, Tim Chase wrote: > > > I want to check, whether all paired lines have attached > > > the same value. > > > > You can find them with > > > > /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@! > > I suppose I should have offered both

Re: Comparing values of two consequent lines

2018-03-29 Thread Tim Chase
On 2018-03-29 06:21, Tim Chase wrote: > > I want to check, whether all paired lines have attached > > the same value. > > You can find them with > > /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1 \+\2\@! I suppose I should have offered both alternatives...finding those that *don't* match,

Re: Comparing values of two consequent lines

2018-03-29 Thread Tim Chase
On 2018-03-29 08:51, tu...@posteo.de wrote: > I have a textfile with lot of lines. > These lines have the following format > > a- > b- [snip] > I want to check, whether all paired lines have attached > the same value. You can find them with /^command a-\(\w\+\) \+\(\d\+\) *\ncommand b-\1

Re: Comparing values of two consequent lines

2018-03-29 Thread Efraim Yawitz
Sounds like a job for awk, but I'm sure someone here will have a more detailed idea. On Thu, Mar 29, 2018 at 9:51 AM, wrote: > Hi, > > I have a textfile with lot of lines. > These lines have the following format > > a- > b- > > where > is a command identical for all lines

Comparing values of two consequent lines

2018-03-29 Thread tuxic
Hi, I have a textfile with lot of lines. These lines have the following format a- b- where is a command identical for all lines are different commands. is a numeric value. The commands are paired. A certain command exist in the form 'a-command' and 'b-command'. The lines are sorted