AIXSolarisAdmin
MIS
Given a file:
Move part of the text on a line to the next line in a specific place.
In this case puppy is moved from line 2 to replace lamb in line 3.
This attempt yields nothing:
Code:
penguin giraffe zebra green
blue bear puppy duck kitty
orange grape lamb koala purple
Move part of the text on a line to the next line in a specific place.
Code:
penguin giraffe zebra green
blue bear duck kitty
orange grape puppy koala purple
In this case puppy is moved from line 2 to replace lamb in line 3.
This attempt yields nothing:
Code:
sed 's/\(.*\)\(puppy\)\(.*\)/{H;\2}/' -e 's/\(.*\)\(lamb\)\(.*\)/\1{g;p}\3/' text