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

I have an ASP.NET website, but this question isn't really about technology, it is
Sorry if this question isn't allowed, but of these 3 which one do you
Now this isn't a question as to which of the technologies is better, since
I was reading this question (which you do not have to read because I
I have a question which is slightly similar to this question on stackoverflow std::cin.clear()
I was reading the linked question which leads me to ask this question. Consider
I've read this question and the answers, but what isn't clear to me is
(The title for this question isn't the best, but I'm unsure how else to
I guess this question isn't only specific to YUI, but that's the JS library
Ok, I ran into this tree question which LOOKED simple, but started driving me

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.