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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:12:16+00:00 2026-06-01T07:12:16+00:00

I have a txt file containing multiple rows of identical size: (Examples) 0123456 789

  • 0

I have a txt file containing multiple rows of identical size:
(Examples)

0123456 789  AND abcdefg hij

For all rows in the file I want to add a space after the 4th character shifting the following characters to the right by 1 character. I also want to remove the space from the 8th character (which would be 9th after the initial space is added).

I have cygwin installed so sed is an option.
I also have php and visual studio 2010 installed.

Any help on this would be greatly appreciated.

  • 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-01T07:12:17+00:00Added an answer on June 1, 2026 at 7:12 am

    I ended up just using Cygwin -> VIM.

    Open input file in Vim Editor.

    Go to first line, first character using “:1”

    Start recording using “qa” (Where a is the name of your macro)

    Move to the 4th character of line.

    Enter into edit mode by pressing “insert” or “i”

    Type your space character.

    Press Esc.

    Move to first character by pressing “Shift+^”.

    Move to next line’s first character.

    Press q to quit from recording mode.

    Now play whatever you have recorded for any number of times you want.
    If you want to play it once press @a
    If you want to repeat this 10 times then type 10@a
    (where a is the macro name you defined earlier)

    Deleting a space follows the same steps except you don’t need to go into edit mode just go to the space you want to remove and hit x and move on with the instructions.

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

Sidebar

Related Questions

I have a txt file containing 5 lines. I want to read the 1st
I have a txt file containing many records, each record has 5 rows and
I have a file called !input.txt containing multiple lines, each line is a random
I have a TXT file containing about 10,000 lines of text. I want to
I have a 'data.txt' file containing two columns and N rows, corresponding to N
i have a .txt file containing data like: He: 22.1 Ar: 21.1 K: 1.22
I have a txt file that created in notepad , containing these lines for
I have a text file (txt) containing formatted text (just line breaks, carriage returns
I have a .txt file like: Symbols from __ctype_tab.o: Name Value Class Type Size
I have a .txt file with product data, which I want to read in

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.