Register
It is currently Mon Sep 22, 2014 6:13 am

SED pass a output line to another


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed Oct 11, 2006 5:16 am   

Joined: Wed Oct 11, 2006 5:10 am
Posts: 1
Hey
Iam new her
I have a line "acadc_dri_DC.c", line 237: [F108] 'LastPwmM' undefined
and i like it to be acadc_dri_DC.c(237): error [F108]: 'LastPwmM' undefined
:?: :?:
But i newer used sed so wat to do.

Thangs


Top
 Profile  
 PostPosted: Tue Dec 05, 2006 9:07 pm   

Joined: Tue Dec 05, 2006 8:37 pm
Posts: 30
Location: Thiruvananthapuram / India
Hi,

The simplest method I can think of is as follows:

Suppose the file data.txt contains the line acadc_dri_DC.c", line 237: [F108] 'LastPwmM' undefined and you what to change it to acadc_dri_DC.c(237): error [F108]: 'LastPwmM' undefined. You can use the folowing sed command to achieve it:

sed 's/", line 237:/(237): error/g' data.txt

or more specifically, you can use:

sed 's/acadc_dri_DC.c", line 237: \[F108\]/acadc_dri_DC.c(237): error [F108]/g' data.txt


Top
 Profile WWW YIM  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP