I'm trying to create a .ksh file in UNIX that will append a new line to the line ABOVE the line it finds. So, the unique charactaristic would exist on the "portalinstance" node below. I want to find that lina and then drop another "component" BEFORE the "component" line above it.
<component action="u" active="t" >
<portletinstance action="unique string" objectid="oid"/>
</component>
I need to use a script to accomplish this and have little experience with SED and AWK.
Thanks.
Start Free Trial