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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:58:04+00:00 2026-05-18T06:58:04+00:00

This is a question which isn’t linked to any practical situation I’m in, but

  • 0

This is a question which isn’t linked to any practical situation I’m in, but it always bugged me.

What could go wrong if I have one script reading and appending lines in one text file and another script reading from the same file?

I know that when a script opens a text file it’s working with the version of that file from the moment it has been opened, not considering following edits. I want both script to be working with the latest possible version (I recon it won’t be real-time) of the text file.

I guess one way of putting the question is: which is the best way to handle said scripts? When should I close and open the file in the first one?

  • 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-18T06:58:05+00:00Added an answer on May 18, 2026 at 6:58 am

    I know that when a script opens a text
    file it’s working with the version of
    that file from the moment it has been
    opened, not considering following
    edits

    This is wrong statement. For example try following command in Unix:

    tail -f <some file>
    

    And then try to add lines to that file. tail command will follow your additions. (assuming you do flush periodically when writing).

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

Sidebar

Related Questions

This isn't a holy war, this isn't a question of which is better. What
Ok, I ran into this tree question which LOOKED simple, but started driving me
This question is related to another question which I asked yesterday! List all links
I know about this question: Which (third-party) debug visualizers for Visual Studio 2005/2008 do
This question originally asked which is the best method for uploading files via SFTP
Edit: This question was written in 2008, which was like 3 internet ages ago.
I just asked this question . Which lead me to a new question :)
I posted this question yesterday evening, which has led me to discover a huge
I'm writing this question with reference to this one which I wrote yesterday. After
Following up on this question, I'm working on a large Delphi 7 codebase which

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.