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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:40:30+00:00 2026-05-20T11:40:30+00:00

There have a million webpages, each page may have some phone numbers with two

  • 0

There have a million webpages, each page may have some phone numbers with two
formats (XXX)XXX-XXXX, XXX-XXX-XXXX, how to find them out and update them into a unified format, i.e., 1-xxx-xxx-xxxx. How to do that using Linux or Unix commands?

  • 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-20T11:40:31+00:00Added an answer on May 20, 2026 at 11:40 am
     cat ph.txt  
    111-222-3333-4444
    (222)-234-2932-2929
    212-939-2929-2929
    

    using sed you can change millon webpages

     cat ph.txt  | sed -e 's/^(//;s/)//;s/^/1-/'
    1-111-222-3333-4444
    1-222-234-2932-2929
    1-212-939-2929-2929
    

    for all html files

    find dirname -type f -name "*.html" -exec sed -e 's/^(//;s/)//;s/^/1-/' {} \;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there have been a million questions asking this, but mine is different.
I have a huge log file where there are about 15 million lines. I
I have a page that executes a long process, parsing over 6 million rows
Say I have 50 million features, each feature comes from disk. At the beggining
I have a multi-million row table with a varchar field. Some of the rows
Ok, I have 2 million rows. Each has a billing date. i'm trying to
Say I have 10 million Customer names each associated with one or more Addresses
I have like a million records each of about 30 characters coming in over
I have some data that includes a column with delimited data. There are multiple
I have a database with 150 million products, I would like index these using

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.