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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:21:57+00:00 2026-06-04T17:21:57+00:00

I have some Grep find/replace commands working well under TextWrangler like the following one:

  • 0

I have some Grep find/replace commands working well under TextWrangler like the following one:

Find: (\”\d+.\d{3})+(\d{3}+[\s]+)

Replace: \1s

For example,this find/replace will replace:

TXTXTXT”123.123456 TXTXTXT
by TXTXTXT”123.123sTXTXTXT

Now I want to do the same thing in command line by using egrep but it’s not working:

egrep -e 's/(\"\d+\.\d{3})+(\d{3}+[\s]+)/\1s' -f m.txt > n.txt

egrep: Regular expression too big

Any idea?
Thank you in advance.

  • 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-04T17:21:57+00:00Added an answer on June 4, 2026 at 5:21 pm

    Your current problem is that the -f option reads the regular expression from a file. Just get rid of it. And lose the -e while you are at it. Just use:

    egrep [regexp] [file] > [another file]
    

    This, however, will leave you with another problem: grep just prints matches, it does not do substitutions. You should probably use sed instead.

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

Sidebar

Related Questions

On bash, I have the following (typical) scenario: ~/some/dir$ find | grep java which
I have a fairly simple bash script that does some grep to find all
I have managed to run hadoop examples grep, wordcount... however I am finding some
I have an array like this: var anArray = [ { name: scala, type:
I have the following alias in my .aliases: alias gi grep -i and I
I have some code that has to compile for multiple platforms. The following will
I have a word list, but it has some words like East's I need
Sometimes I am reading some code and would like to find the definition for
I'm working on a shell script to automate some server tasks. One the major
I have some hourly acquired data files. They filenames look like: 20120101-00.raw 20120101-01.raw ...

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.