linux + file output manipulation [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-2
down vote

favorite












we have the follwing file ( could be the same line more or less )



more /tmp/info

linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes


how to manipulate the output so we get the follwing



expected results ( with lines indention )



linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s


linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full



linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes






share|improve this question













closed as unclear what you're asking by αғsнιη, Archemar, jimmij, Romeo Ninov, meuh Apr 29 at 15:27


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • you need indention or add empty lines between? or both? and what have you tried so far?
    – Î±Ò“sнιη
    Apr 29 at 10:02











  • yes we need to indent the lines
    – jango
    Apr 29 at 10:08










  • @jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
    – RomanPerekhrest
    Apr 29 at 10:09











  • yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
    – jango
    Apr 29 at 10:11






  • 1




    @jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
    – RomanPerekhrest
    Apr 29 at 10:18














up vote
-2
down vote

favorite












we have the follwing file ( could be the same line more or less )



more /tmp/info

linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes


how to manipulate the output so we get the follwing



expected results ( with lines indention )



linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s


linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full



linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes






share|improve this question













closed as unclear what you're asking by αғsнιη, Archemar, jimmij, Romeo Ninov, meuh Apr 29 at 15:27


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • you need indention or add empty lines between? or both? and what have you tried so far?
    – Î±Ò“sнιη
    Apr 29 at 10:02











  • yes we need to indent the lines
    – jango
    Apr 29 at 10:08










  • @jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
    – RomanPerekhrest
    Apr 29 at 10:09











  • yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
    – jango
    Apr 29 at 10:11






  • 1




    @jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
    – RomanPerekhrest
    Apr 29 at 10:18












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











we have the follwing file ( could be the same line more or less )



more /tmp/info

linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes


how to manipulate the output so we get the follwing



expected results ( with lines indention )



linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s


linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full



linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes






share|improve this question













we have the follwing file ( could be the same line more or less )



more /tmp/info

linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes


how to manipulate the output so we get the follwing



expected results ( with lines indention )



linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s
linux01.sys76.com eno83122 Speed 10000Mb/s
linux02.sys76.com eno83122 Speed 10000Mb/s
linux03.sys76.com eno83122 Speed 10000Mb/s


linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full
linux01.sys76.com eno83122 Duplex Full
linux02.sys76.com eno83122 Duplex Full
linux03.sys76.com eno83122 Duplex Full



linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes
linux01.sys76.com eno83122 Link_detected yes
linux02.sys76.com eno83122 Link_detected yes
linux03.sys76.com eno83122 Link_detected yes








share|improve this question












share|improve this question




share|improve this question








edited Apr 29 at 13:22









Jeff Schaller

31.1k846105




31.1k846105









asked Apr 29 at 9:54









jango

11518




11518




closed as unclear what you're asking by αғsнιη, Archemar, jimmij, Romeo Ninov, meuh Apr 29 at 15:27


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by αғsнιη, Archemar, jimmij, Romeo Ninov, meuh Apr 29 at 15:27


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • you need indention or add empty lines between? or both? and what have you tried so far?
    – Î±Ò“sнιη
    Apr 29 at 10:02











  • yes we need to indent the lines
    – jango
    Apr 29 at 10:08










  • @jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
    – RomanPerekhrest
    Apr 29 at 10:09











  • yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
    – jango
    Apr 29 at 10:11






  • 1




    @jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
    – RomanPerekhrest
    Apr 29 at 10:18
















  • you need indention or add empty lines between? or both? and what have you tried so far?
    – Î±Ò“sнιη
    Apr 29 at 10:02











  • yes we need to indent the lines
    – jango
    Apr 29 at 10:08










  • @jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
    – RomanPerekhrest
    Apr 29 at 10:09











  • yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
    – jango
    Apr 29 at 10:11






  • 1




    @jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
    – RomanPerekhrest
    Apr 29 at 10:18















you need indention or add empty lines between? or both? and what have you tried so far?
– Î±Ò“sнιη
Apr 29 at 10:02





you need indention or add empty lines between? or both? and what have you tried so far?
– Î±Ò“sнιη
Apr 29 at 10:02













yes we need to indent the lines
– jango
Apr 29 at 10:08




yes we need to indent the lines
– jango
Apr 29 at 10:08












@jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
– RomanPerekhrest
Apr 29 at 10:09





@jango, then you should describe the indentation logic: how should the 4th, 5th, 6th, 7th block be indented and you should specify the indentation size
– RomanPerekhrest
Apr 29 at 10:09













yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
– jango
Apr 29 at 10:11




yes only 4th as linux01.sys76.com eno83122 Speed 10000Mb/s ( we can ignore : "
– jango
Apr 29 at 10:11




1




1




@jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
– RomanPerekhrest
Apr 29 at 10:18




@jango, what is the problem with describing the indentation logic? why should the 3rd block not be indented?
– RomanPerekhrest
Apr 29 at 10:18










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Awk solution:



awk 'prev && prev != $3 print ORS ORS prev = $3 1' /tmp/info


The output:



linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s



linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full



linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes





share|improve this answer





















  • is it include lines indentation ?
    – jango
    Apr 29 at 10:09










  • see my update in the question
    – jango
    Apr 29 at 10:14

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










Awk solution:



awk 'prev && prev != $3 print ORS ORS prev = $3 1' /tmp/info


The output:



linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s



linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full



linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes





share|improve this answer





















  • is it include lines indentation ?
    – jango
    Apr 29 at 10:09










  • see my update in the question
    – jango
    Apr 29 at 10:14














up vote
0
down vote



accepted










Awk solution:



awk 'prev && prev != $3 print ORS ORS prev = $3 1' /tmp/info


The output:



linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s



linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full



linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes





share|improve this answer





















  • is it include lines indentation ?
    – jango
    Apr 29 at 10:09










  • see my update in the question
    – jango
    Apr 29 at 10:14












up vote
0
down vote



accepted







up vote
0
down vote



accepted






Awk solution:



awk 'prev && prev != $3 print ORS ORS prev = $3 1' /tmp/info


The output:



linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s



linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full



linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes





share|improve this answer













Awk solution:



awk 'prev && prev != $3 print ORS ORS prev = $3 1' /tmp/info


The output:



linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s
linux01.sys76.com eno83122 Speed: 10000Mb/s
linux02.sys76.com eno83122 Speed: 10000Mb/s
linux03.sys76.com eno83122 Speed: 10000Mb/s



linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full
linux01.sys76.com eno83122 Duplex: Full
linux02.sys76.com eno83122 Duplex: Full
linux03.sys76.com eno83122 Duplex: Full



linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes
linux01.sys76.com eno83122 Link detected: yes
linux02.sys76.com eno83122 Link detected: yes
linux03.sys76.com eno83122 Link detected: yes






share|improve this answer













share|improve this answer



share|improve this answer











answered Apr 29 at 10:03









RomanPerekhrest

22.4k12144




22.4k12144











  • is it include lines indentation ?
    – jango
    Apr 29 at 10:09










  • see my update in the question
    – jango
    Apr 29 at 10:14
















  • is it include lines indentation ?
    – jango
    Apr 29 at 10:09










  • see my update in the question
    – jango
    Apr 29 at 10:14















is it include lines indentation ?
– jango
Apr 29 at 10:09




is it include lines indentation ?
– jango
Apr 29 at 10:09












see my update in the question
– jango
Apr 29 at 10:14




see my update in the question
– jango
Apr 29 at 10:14


Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?