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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:46:58+00:00 2026-05-15T21:46:58+00:00

C:\crp\cnp>sed -V GNU sed version 3.02 Copyright (C) 1998 Free Software Foundation, Inc……. C:\crp\cnp>type

  • 0
C:\crp\cnp>sed -V

GNU sed version 3.02

Copyright (C) 1998 Free Software Foundation, Inc.......


C:\crp\cnp>type f.f

a a a

a a a

Trying to replace ‘a’ with spaces.

C:\crp\cnp>type f.f | sed -e s/a/\d032/g

d032 d032 d032

d032 d032 d032

why isn’t it working?

I don’t mind whether i’m finding or replacing spaces or new lines.. I just want to be able to specify them. It doesn’t seem to be working and I don’t know why.

(Replacing spaces or a space, with f, doesn’t work)

C:\crp\cnp>echo a a | sed s/\d32/f/
a a

Note- it seems it might work in 4.2 , But i’m interested in 3.02 ‘cos that’s the version bundled with unxutils http://unxutils.sourceforge.net/

Update to question-
thanks for paxdiablo’s tip.. about gnu32win, I am now using that instead of unxutils. It is more up to date. I can now specify spaces. And tip of ghostdog, and paxdiablo, I see about the double quotes. I am fine specifying spaces with \d(since using 4.2) or with a space.
But, I still can’t remove new lines

C:\crp>type f.f | sed -e “s/\r\n/f/g”

a aa

b bb

c cc

C:\crp>type f.f | sed -e “s/\d013\d010/f/g”

a aa

b bb

c cc

C:\crp>type f.f | sed -e “s/\x0D\x0A/f/g”

a aa

b bb

c cc

Note: This question was from 2010. Now it’s 2020. Gnuwin32 is out of date(like the last time its Gnuwin32 sed was updated was 2010, with Sed 4.2.1 which was from 2009), Unxutils is even more out of date. So Gnuwin32 as of writing is a decade out of date, and Unxutils is more like 2 decades out of date, as of 2020. Cygwin is still kept up to date and as of writing is on Sed v 4.4 which is from 2017.

  • 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-15T21:46:58+00:00Added an answer on May 15, 2026 at 9:46 pm

    Why aren’t you just using a space character itself rather than some funny encoding? As in:

    sed -e 's/a/ /g'
    

    For what it’s worth, the command you gave also fails to work in 4.2.1 but, if you add in the quotes, it does work. So I suggest you change it to:

    sed -e 's/a/\d032/g'
    

    Apologies, I’ve just noticed you’re running Windows so you’ve probably got CygWin or GnuWin32 (or equivalent).

    Quotes work differently under Windows so you should try two things. The first is to use " instead of ' quotes:

    sed -e "s/a/ /g"
    

    Otherwise, the escape character in Windows is ^ so something like this should be able to escape the space:

    sed -e s/a/^ /g
    

    As an aside, I’d be looking to switch to GnuWin32, if possible, which has more recent versions of sed (for example). It doesn’t look like UnxUtils has had an update since 2003 based on that web page you link to. You can get individual packages from here. You’re looking for coreutils which contains the bulk of the UNIX text processing toolkit.

    But, if you’re stuck with UnxUtils, I’d just use the actual space rather than a decimal code, and then I’d use tr to get rid of new lines:

    tr -d "\n"
    

    assuming of course that the tr in textutils can handle that syntax 🙂

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

Sidebar

Related Questions

I want to center a div, but the general way is #selector{position:relative;margin:0px auto;} What
Overflow. I have an application which is supposed to convert a video via DirectShowSource.
The xmlns attribute in the following code stops me getting the value I need.
I'm hittig my head on this and i will be glad for any help.
I've switched from Mootools to jQuery, because I think it has better support. I've
I am often in a situation where I have a concept represented by an

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.