Advertisement

09.05.2007 at 11:49AM PDT, ID: 22808833
[x]
Attachment Details

File manipulation SED or AWK

Asked by reuel3 in Linux Programming, Unix Operating Systems, Unix Systems Programming

Tags: file, awk, manipulation, sed

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
[+][-]09.05.2007 at 11:59AM PDT, ID: 19834833

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.06.2007 at 11:18AM PDT, ID: 19842463

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.06.2007 at 01:17PM PDT, ID: 19843360

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 08:35AM PDT, ID: 19848622

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 08:44AM PDT, ID: 19848717

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 10:10AM PDT, ID: 19849414

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2007 at 02:35PM PDT, ID: 19854601

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 01:36PM PDT, ID: 19872060

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux Programming, Unix Operating Systems, Unix Systems Programming
Tags: file, awk, manipulation, sed
Sign Up Now!
Solution Provided By: reuel3
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.11.2007 at 01:44PM PDT, ID: 19872113

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628