Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Please explain exactly how hardcoding the checksum is a good idea. Commented May 24, 2019 at 0:14
  • not hardcoding checksum, its only create identity key of your script, when another instance will running, it will check other shell script process and cat the file first, if your identity key is on that file, so its mean your instance already running. Commented May 24, 2019 at 6:35
  • OK; please edit your answer to explain that.  And, in the future, please don’t post multiple 30-line long blocks of code that look like they’re (almost) identical without saying and explaining how they’re different.  And don’t say things like “you can hardcoded [sic] cksum inside your script”, and don’t continue to use variable names mysum and fsum, when you’re not talking about a checksum any more. Commented May 24, 2019 at 7:08
  • Looks interesting, thanks! And welcome to unix.stackexchange :) Commented May 24, 2019 at 8:08