Opened 5 years ago
Last modified 5 years ago
#3996 new enhancement
Allow multiple --exec's
Reported by: | jidanni | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | 7.8.3 |
Component: | Startup | Version: | git-releasebranch78 |
Keywords: | exec grass.py init | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Enhancement idea:
Even though one can run whole shell scripts, how about also allowing more than one "grass --exec"?
Perhaps allow multiple --exec's using Unix find(1)'s method:
-exec ... ... \; -exec ... ... \;
In fact it one fails, don't run the rest, just like Unix.
Change History (7)
comment:2 by , 5 years ago
Replying to mankoff:
Somewhat related - you can use HEREDOCs
Great to know, and should be documented.
(Alas I am mainly doing one-liners in Makefiles.)
follow-up: 4 comment:3 by , 5 years ago
HEREDOCs work in Makefiles.
This seems like a bad idea https://stackoverflow.com/questions/5873025/heredoc-in-a-makefile
comment:4 by , 5 years ago
Replying to mankoff:
HEREDOCs work in Makefiles.
This seems like a bad idea...
Yup, and that's why I learned perl while the other kids learned python. At least good old ";"'s still work.
comment:5 by , 5 years ago
Keywords: | exec grass.py init added |
---|
Replying to jidanni:
Replying to mankoff:
Somewhat related - you can use HEREDOCs
Great to know, and should be documented.
It does not work in a way, at least I think, it should work, so that's partially the reason it is not in documentation. There is actually a ticket for it: #2639, so I suggest have further discussion on this there (if needed).
comment:6 by , 5 years ago
Back to the --exec ... \; --exec ... \;
enhancement:
Before somebody dives into implementing this. Do you want to elaborate on the syntax, use cases, examples, edge cases, and similarities (and differences) to other tools besides find. That would be good to have before committing to support additional syntax when there are other ways to achieve the same (for example, aforementioned here document, an .sh
script, or --exec bash -c "... ; ...;"
.)
comment:7 by , 5 years ago
Milestone: | → 7.8.3 |
---|
Somewhat related - you can use HEREDOCs: