News for hackers. Stuff that matters.
Re:Bad Data and Data Engineering: Dissecting Google Play Mus... by wodenokoto on Sunday December 26, 2021 @11:50AM (#29693971)
> The script should be decently self-explanatory [...] Please note that this is all single-threaded, which I don’t recommend - with nohup and the like, you can trivially parallelize this.

How do you parallelize a loop in bash without getting all the echo's intertwined and jumbled together?

Re:Bad Data and Data Engineering: Dissecting Google Play Mus... by karlding on Sunday December 26, 2021 @12:19PM (#29694254)
In general, you can partition the loop to delegate to "workers" and have each instance pipe the output to different files, each corresponding to an output stream. This avoids the need for mutual exclusion around your output streams. If you need to aggregate logs then run some log aggregator.
Re:Bad Data and Data Engineering: Dissecting Google Play Mus... by otter-in-a-suit on Sunday December 26, 2021 @08:42PM (#29698160)
Maybe not nohup itself, but I often do simple background tasks + a blocking `wait` statement in a loop, for instance here: https://github.com/chollinger93/debian-scripts/blob/master/u...

If you don't use nohup, you can just pipe stdout and err to a different file descriptor for logs within said loop.

Or, of course, script something in a language of your choice.