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

  • Home
  • SEARCH
  • 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 3761788
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:40:48+00:00 2026-05-19T10:40:48+00:00

I have a text file which is about 400,000 lines long. I need to

  • 0

I have a text file which is about 400,000 lines long. I need to import this text file into a program which only accepts text files which are delimited with spaces or tabs, but this text file is delimited with semi-colons. There is no option in the program I am exporting the text file from (Arcmap) to change the delimination and doing find and replace in the text file itself will literally take 2 days.

I have searched for a script to do this but they all seem to replace the whole LINE of the word file with a space, instead of individually replacing each semi-colon, Leaving me with an empty text file.

Here is a sample of my text file:

"OID_";"POINTID";"GRID_CODE";"POINT_X";"POINT_Y"
;1;-56.000000;200900.250122;514999.750122
;2;-56.000000;200900.750122;514999.750122
;3;-56.000000;200901.250122;514999.750122
;4;-57.000000;200901.750122;514999.750122
;5;-57.000000;200902.250122;514999.750122
;6;-57.000000;200902.750122;514999.750122
;7;-57.000000;200903.250122;514999.750122
;8;-57.000000;200903.750122;514999.750122
;9;-57.000000;200904.250122;514999.750122
;10;-57.000000;200904.750122;514999.750122

I need it to look something like this:

1 -56.000000 200900.250122 514999.750122
2 -56.000000 200900.750122 514999.750122
  • 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-19T10:40:49+00:00Added an answer on May 19, 2026 at 10:40 am

    How about this:

    sed -i 's/;/ /g' yourBigFile.txt
    

    This is not a Python solution. You have to start this in a shell. But if you use Notepad, I guess you are on Windows. So here a Python solution:

    f1 = open('yourBigFile.txt', 'r')
    f2 = open('yourBigFile.txt.tmp', 'w')
    for line in f1:
        f2.write(line.replace(';', ' '))
    f1.close()
    f2.close()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text file with about 100,000 lines (5 MB), which is updated
I have few text and excel file, from which I need to import data
I use this script which submits links into a text file. The only problem
I have a file which has text like this: #1#14#ADEADE#CAH0F#0#0..... I need to create
I have a text file which contains data seperated by '|'. I need to
I have a text file which contains something like this: Hello, my name is
I have a huge text file which I want to explode into an array.
I have a text file, which looks like this: node13 state = free np
I have an XML file which I'd like to parse into a non-XML (text)
I have a Haskell program which processes a text file and builds a Map

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.