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*

7
  • Thank you @ilkkachu, great answer and works well!! Commented Mar 26, 2019 at 21:50
  • Hi @ilkkachu, I wonder if you could let me know if there's a way to escape the "stored as-is" under the cat << 'EOF' circumstance. More specifically, I want ${letter} in both bash script filename and within the script. Commented Mar 27, 2019 at 15:14
  • You mentioned that creating "one" script and passing the letter to it as a command line argument. Could you elaborate more on that? My original thought is to break down files based on alphabets and run in parallel. However, if there's a way to break down the files individually and run scripts in parallel would be even better, I should work on that. Commented Mar 27, 2019 at 15:15
  • @Molly_K, I tried to adapt your script to picking $letter from the command line. For parallel processing, you could write the script so that it processes just one file, and then run xargs -P or use GNU parallel to run a bunch of them at a time. Commented Mar 27, 2019 at 19:14
  • There's probably a dozen or so Q&A's about running scripts in parallel here on the site, see e.g. unix.stackexchange.com/q/169326/170373 and unix.stackexchange.com/q/211976/170373 and the search unix.stackexchange.com/… Commented Mar 27, 2019 at 19:16