kislow / kislow/tmp

M: Script is not idempotent - #5

Open
#13 1 comment 0 reactions 1 assignee View on GitHub

@Rtaibzadah is already working on this.

Since Dec 18, 2025.

bug
Dominant language
Shell
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Description

Running challenge-m.sh multiple times currently causes the script to append duplicate content to the output file.

This makes the script unsafe to run more than once and unsuitable for automation.

The script must be made idempotent, meaning repeated executions produce the same result without duplication.

Acceptance Criteria

  • Running the script multiple times produces the same output every time
  • No duplicate entries are written to the output file
  • Existing valid data is preserved and not corrupted
  • The script behaves correctly whether the output file already exists or not

Notes

  • Assume this script may be executed automatically (e.g. via cron)
  • The solution should be simple and easy to reason about
  • Idempotency is more important than performance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.