Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 639783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:52:51+00:00 2026-05-13T20:52:51+00:00

I am trying to get SED to transform the output from a TMS320C55x compiler

  • 0

I am trying to get SED to transform the output from a TMS320C55x compiler so that it is parsed correctly by Visual Studio (so that when you click an error/warning it jumps to the location in the source. I have done this successfully with other compilers, but do not use SED often enough for this to be painless, and this time it has defeated me.

The compiler output is of the form:

"<file>", line <line>: <error|warning> <id>: <text>

for example:

"ImageBuffer.c", line 21: error #20: identifier "p" is undefined

And I need it transformed to:

<file>(<line>) : <error|warning> <id>: <text>

so for the example above:

ImageBuffer.c(2) : error #20: identifier "p" is undefined

The critical thing is the () part.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:52:52+00:00Added an answer on May 13, 2026 at 8:52 pm

    I can get that output by using:

    c:\src>echo "ImageBuffer.c", line 21: error #20: identifier "p" is undefined
        | sed -e "s/\"//" -e "s/\", line /(/" -e "s/:/) :/"
    ImageBuffer.c(21) : error #20: identifier "p" is undefined
    

    I’m having to escape the " characters because I’m doing it from cmd.exe but you can use them unescaped in a more UNIXy environment if you just use single quotes to surround the sed commands.

    The individual sed commands:

    • "s/\"//" gets rid of the starting quote from the file name.
    • "s/\", line /(/" gets rid of the ending quote from the file name and replaces the text between file name and line number with the opening parenthesis before the line number.
    • "s/:/) :/" puts the closing parenthesis after the line number after removing some other unnecessary text.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have am trying to use sed to get some info that is encoded
I'm using Debian 6 and GNU sed, trying to get awk to convert the
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get comfortable with jQuery and I have encountered some sample code that
Trying to get a JSON output to work with jqGrid 'userdata' option. The example
I'm trying to get the redirect link from a site by using curl -I
I'm trying to do my homework that is restricted to only using sed to
I'm trying to use sed -i -e s/.*seb.*/ \$ftp_login_template\/ $ftp_dir however I get this
I am using vim to make a simple script trying get the output of
I'm trying to get an MP3 file's information from ID3 tags. my $output_file =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.