How do I tell GNU Parallel to not quote the replacement stringreplacement inside parallel command stringCan...
How to convert a file with several spaces into a tab-delimited file?
Are unclear "take-it or leave-it" contracts interpreted in my favor?
Why can a destructor change the state of a constant object?
Why are all my yellow 2V/20mA LEDs burning out with 330k Ohm resistor?
Graduate student with abysmal English writing skills, how to help
Does throwing a penny at a train stop the train?
If your plane is out-of-control, why does military training instruct releasing the joystick to neutralize controls?
Why didn't Thanos kill all the Dwarves on Nidavellir?
Is there any word for "disobedience to God"?
Are there any sports for which the world's best player is female?
How many hours would it take to watch all of Doctor Who?
What is this triple-transistor arrangement called?
What is a solution?
How can a dictatorship government be beneficial to a dictator in a post-scarcity society?
How can I effectively communicate to recruiters that a phone call is not possible?
During copyediting, journal disagrees about spelling of paper's main topic
Is "I do not want you to go nowhere" a case of "DOUBLE-NEGATIVES" as claimed by Grammarly?
How do you glue a text to a point?
How to memorize multiple pieces?
How would vampires avoid contracting diseases?
Find image dimensions without importing the full image?
For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?
Is anyone advocating the promotion of homosexuality in UK schools?
Simple interepretation problem regarding Polynomial Hierarchy?
How do I tell GNU Parallel to not quote the replacement string
replacement inside parallel command stringCan GNU Parallel execute more parallel processes?GNU Parallel: Event not found (!~)gnu parallel with no argument scriptPrevent GNU parallel from splitting quoted argumentsGNU Parallel: startup script on each nodeKeeping dirs in order with GNU ParallelCan GNU parallel output stdout before the program has exited?Can GNU Parallel Alter the Output of a Bash ScriptGNU Parallel alternating jobs
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
GNU Parallel quotes replacement strings by default so that they are not expanded by the shell. But in certain cases you really want the replacement string to be interpreted by the shell.
E.g.
$ cat variables.txt
--var1 0.1 --var2 0.2
--var1 0.11 --var3 0.03
Here I want GNU Parallel to run:
myprogram --var1 0.1 --var2 0.2
myprogram --var1 0.11 --var3 0.03
How is that done?
How is it done, if only some of the replacement strings should be interpreted:
E.g.
$ ls
My file1.txt
My file2.txt
And I want this run:
myprogram --var1 0.1 --var2 0.2 'My file1.txt'
myprogram --var1 0.11 --var3 0.03 'My file1.txt'
myprogram --var1 0.1 --var2 0.2 'My file2.txt'
myprogram --var1 0.11 --var3 0.03 'My file2.txt'
quoting gnu-parallel
add a comment |
GNU Parallel quotes replacement strings by default so that they are not expanded by the shell. But in certain cases you really want the replacement string to be interpreted by the shell.
E.g.
$ cat variables.txt
--var1 0.1 --var2 0.2
--var1 0.11 --var3 0.03
Here I want GNU Parallel to run:
myprogram --var1 0.1 --var2 0.2
myprogram --var1 0.11 --var3 0.03
How is that done?
How is it done, if only some of the replacement strings should be interpreted:
E.g.
$ ls
My file1.txt
My file2.txt
And I want this run:
myprogram --var1 0.1 --var2 0.2 'My file1.txt'
myprogram --var1 0.11 --var3 0.03 'My file1.txt'
myprogram --var1 0.1 --var2 0.2 'My file2.txt'
myprogram --var1 0.11 --var3 0.03 'My file2.txt'
quoting gnu-parallel
add a comment |
GNU Parallel quotes replacement strings by default so that they are not expanded by the shell. But in certain cases you really want the replacement string to be interpreted by the shell.
E.g.
$ cat variables.txt
--var1 0.1 --var2 0.2
--var1 0.11 --var3 0.03
Here I want GNU Parallel to run:
myprogram --var1 0.1 --var2 0.2
myprogram --var1 0.11 --var3 0.03
How is that done?
How is it done, if only some of the replacement strings should be interpreted:
E.g.
$ ls
My file1.txt
My file2.txt
And I want this run:
myprogram --var1 0.1 --var2 0.2 'My file1.txt'
myprogram --var1 0.11 --var3 0.03 'My file1.txt'
myprogram --var1 0.1 --var2 0.2 'My file2.txt'
myprogram --var1 0.11 --var3 0.03 'My file2.txt'
quoting gnu-parallel
GNU Parallel quotes replacement strings by default so that they are not expanded by the shell. But in certain cases you really want the replacement string to be interpreted by the shell.
E.g.
$ cat variables.txt
--var1 0.1 --var2 0.2
--var1 0.11 --var3 0.03
Here I want GNU Parallel to run:
myprogram --var1 0.1 --var2 0.2
myprogram --var1 0.11 --var3 0.03
How is that done?
How is it done, if only some of the replacement strings should be interpreted:
E.g.
$ ls
My file1.txt
My file2.txt
And I want this run:
myprogram --var1 0.1 --var2 0.2 'My file1.txt'
myprogram --var1 0.11 --var3 0.03 'My file1.txt'
myprogram --var1 0.1 --var2 0.2 'My file2.txt'
myprogram --var1 0.11 --var3 0.03 'My file2.txt'
quoting gnu-parallel
quoting gnu-parallel
asked 53 mins ago
Ole TangeOle Tange
13.6k17 gold badges60 silver badges108 bronze badges
13.6k17 gold badges60 silver badges108 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
From version 20190722 you can use uq()
in a perl replacement string to make that replacement unquoted:
parallel myprogram '{=1 uq(); =}' {2} :::: variables.txt ::: My*.txt
This can not be done in earlier versions. You can, however, unquote the full command with eval
. This solves the first problem, but not the second.
parallel eval myprogram {} :::: variables.txt
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529486%2fhow-do-i-tell-gnu-parallel-to-not-quote-the-replacement-string%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
From version 20190722 you can use uq()
in a perl replacement string to make that replacement unquoted:
parallel myprogram '{=1 uq(); =}' {2} :::: variables.txt ::: My*.txt
This can not be done in earlier versions. You can, however, unquote the full command with eval
. This solves the first problem, but not the second.
parallel eval myprogram {} :::: variables.txt
add a comment |
From version 20190722 you can use uq()
in a perl replacement string to make that replacement unquoted:
parallel myprogram '{=1 uq(); =}' {2} :::: variables.txt ::: My*.txt
This can not be done in earlier versions. You can, however, unquote the full command with eval
. This solves the first problem, but not the second.
parallel eval myprogram {} :::: variables.txt
add a comment |
From version 20190722 you can use uq()
in a perl replacement string to make that replacement unquoted:
parallel myprogram '{=1 uq(); =}' {2} :::: variables.txt ::: My*.txt
This can not be done in earlier versions. You can, however, unquote the full command with eval
. This solves the first problem, but not the second.
parallel eval myprogram {} :::: variables.txt
From version 20190722 you can use uq()
in a perl replacement string to make that replacement unquoted:
parallel myprogram '{=1 uq(); =}' {2} :::: variables.txt ::: My*.txt
This can not be done in earlier versions. You can, however, unquote the full command with eval
. This solves the first problem, but not the second.
parallel eval myprogram {} :::: variables.txt
answered 53 mins ago
Ole TangeOle Tange
13.6k17 gold badges60 silver badges108 bronze badges
13.6k17 gold badges60 silver badges108 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529486%2fhow-do-i-tell-gnu-parallel-to-not-quote-the-replacement-string%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown