Advertisement

12.19.2007 at 05:51AM PST, ID: 23033325
[x]
Attachment Details

Need sed/awk script to change a line in a text file

Asked by 9thTee in IBM AIX Unix, Linux Programming

Tags: line, awk, change, sed, text

Hi,
I have a text file on my IBM AIX machine that contains many lines like this one:
^[E^[&k2G^[&l5H^[&f7y4X^[&l0L^[&l6D^[(8U^[(s0p15.00h0s0b4102T^[&k12H^[&a0h0V^[&a5040v0H
(The ^[ are escape characters)

I need this line changed to ^L (ctrl-L for form feed).

I need a sed or awk script that will convert the long line to a line that has ^L on it.  I need the script to accept std input and write to std out.  Like:  cat my_text_file | your_script > updated_file

Thanks for your help.
MarkStart Free Trial
[+][-]12.19.2007 at 06:17AM PST, ID: 20499650

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.

 
[+][-]12.19.2007 at 06:17AM PST, ID: 20499651

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.

 
[+][-]12.19.2007 at 06:19AM PST, ID: 20499665

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: IBM AIX Unix, Linux Programming
Tags: line, awk, change, sed, text
Sign Up Now!
Solution Provided By: jscase
Participating Experts: 3
Solution Grade: A
 
 
[+][-]12.19.2007 at 06:46AM PST, ID: 20499829

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.

 
[+][-]12.19.2007 at 06:53AM PST, ID: 20499885

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.

 
[+][-]12.19.2007 at 07:00AM PST, ID: 20499944

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.

 
[+][-]12.19.2007 at 07:13AM PST, ID: 20500045

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.

 
[+][-]12.19.2007 at 07:14AM PST, ID: 20500047

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.

 
[+][-]12.19.2007 at 07:23AM PST, ID: 20500143

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.

 
[+][-]12.19.2007 at 08:49AM PST, ID: 20500863

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.

 
[+][-]12.19.2007 at 01:56PM PST, ID: 20503337

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.

 
[+][-]12.19.2007 at 05:36PM PST, ID: 20504418

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.

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