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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:06:05+00:00 2026-05-29T06:06:05+00:00

I have a log document where the string to split columns on is just

  • 0

I have a log document where the string to split columns on is just the character \x01 (doesn’t map to anything real in unicode, so it’s safe). When I run the following on the phrase “This is \x01” on a CentOS box, I get:

cat ~/temp1 | sed s/\x01/meh/
this is meh

On a Mac, I get:

cat ~/temp1 | sed s/\x01/meh/
this is  

Which is identical to trying to cat the original.

Alternatively, running a Perl one liner on this on a Mac as:

cat ~/temp1 | perl -e 'while ( my $line = <>) {$line =~ s/\x01/meh/g; print $line;}'

gets me:

this is meh

So, my conclusion thus far is that sed on a Mac hates unicode for some reason. Anyone have any ideas why/ how to fix it?

  • 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-29T06:06:06+00:00Added an answer on May 29, 2026 at 6:06 am

    Use GNU sed from the MacPorts package gsed.

    Edit: Documentation of GNU sed is here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code. class MyParser < Nokogiri::XML::SAX::Document def characters(string) LOG.debug(characters #{string}) end def
I have this java code: if(isNull(office) || isNull(pricelist)) { log.warn(The document {0}-{1} is not
I have this tag in a php string: <input type=submit name=op id=edit-submit value=Log in
We have a collection of log data, where each document in the collection is
I have the following function: $(document).ready(function() { $(#dSuggest).keypress(function() { var dInput = $('input:text[name=dSuggest]').val(); console.log(dInput);
We've faced strange problem. We have log on service, that authenticates user, adds auth
I have several log files of events (one event per line). The logs can
I have a log in page where I valid my users and based on
i have a log file which contains hundreds/thousands of seperate XML messages and need
We have multiple log files like database log, weblog, quartzlog in our application. Any

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.