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 8054447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:09:16+00:00 2026-06-05T08:09:16+00:00

The format of the output is the same except that when using python, the

  • 0

The format of the output is the same except that when using python, the output adds a new line between each string. Any idea why and how I can do this using sed?

sed 's:\x01: | :g'

01.06.2012 07:51:55.135 | 3732 | INFO | xxx | 8=FIX.4.2 | 9=157 | 35=V | 56=xxx | 49=xxx | 52=20120601-07:51:54 | 34=40 | 262=VMD1338537114945 | 263=1 | 264=0 | 265=1 | 
01.06.2012 07:51:55.135 | 3732 | INFO | xxx | 8=FIX.4.2 | 9=157 | 35=V | 56=xxx | 49=xxx | 52=20120601-07:51:54 | 34=41 | 262=VLT1338537114945 | 263=1 | 264=1 | 265=1 | 

for line in sys.stdin:
    print line.replace("\01", " | ")


01.06.2012 07:51:55.135 | 3732 | INFO | xxx | 8=FIX.4.2 | 9=157 | 35=V | 56=xxx | 49=xxx | 52=20120601-07:51:54 | 34=40 | 262=VMD1338537114945 | 263=1 | 264=0 | 265=1 | 

01.06.2012 07:51:55.135 | 3732 | INFO | xxx | 8=FIX.4.2 | 9=157 | 35=V | 56=xxx | 49=xxx | 52=20120601-07:51:54 | 34=41 | 262=VLT1338537114945 | 263=1 | 264=1 | 265=1 | 
  • 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-06-05T08:09:17+00:00Added an answer on June 5, 2026 at 8:09 am

    Add a second substitution that replaces the end of the line with a newline: s/$/\n/. Since you have two patterns now, you need to use -e:

    sed -e 's:\x01: | :g' -e 's/$/\n/'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to format the output of Select-String to include newlines between
Possible Duplicates: Is String.Format as efficient as StringBuilder C# String output: format or concat?
I am able to get the output format that I need, but not the
I am trying to format some c# output so that a number always has
I can output a locale sensitive time format using strftime('%X') , but this always
I have a python script that makes a series of url calls using urllib2.
I want gitweb to output the same diff format as git diff --color-words .
I am trying to format a string in the output differently than the way
I'm just wondering what is an ideal output format for the AJAX response? Pure
I'm having a problem trying to format the output on the jQuery UI datepicker.

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.