|
From: | Ernst, Kevin |
Subject: | Re: Parallel script with variable name |
Date: | Thu, 28 Feb 2019 03:20:14 +0000 |
Hi Lindsey, If I’m understanding you correctly, then
The “parallel way” would look like this:
which implicitly means
which can be simplified to:
…since the shell will expand the wildcards—also called “globs”—for you. This also saves a process (because there is no pipe), which is not a super-huge deal in this simple example, but it’s, like, points for style. A complete reference for how this “filename expansion” happens is here. It most cases, it’s fine, but in general it’s more conservative to let the shell itself do wildcard expansion, or to use
If you haven’t checked them out already, the videos the author posted to YouTube are really excellent, and not too long. You can get lots of insight about GNU Parallel (from basic use cases that you can employ immediately, all the way up to some mind-bending possibilities) with just about 30 minutes of your time. If you ever lose the URL to the YouTube playlist, it’s also mentioned in the man page. Hope this helps. —Kevin |
[Prev in Thread] | Current Thread | [Next in Thread] |