I try to use gap
version 4.10 with xargs
as following:
$ echo 1 | xargs -I '{}' gap -b <( echo 'Display("{}");' ) <( echo 'QUIT;')
which returns
{}
However, it should be
1
Following works
$ gap -b <( echo 'Display("123");' ) <( echo 'QUIT;')
123
If you do not have gap
v4.10, you can replace gap
with cat
and still see my problem:
$ echo 1 | xargs -I '{}' cat <( echo 'Display("{}");' ) <( echo 'QUIT;')
Display("{}");
QUIT;
How can I achieve that the return value becomes?
Display("1");
QUIT;
From my point of view, this has nothing to do with gap but the combination of xargs and process substitution in the shell. I have zsh 5.7.1 and GNU bash 5.0.3 available. xargs is GNU version 4.8.0.
Notes:
- My motivation is that I want to run a gap script in parallel with different parameters from the shell.
gap
version 4.10 has not yet the option-c <expr>
(commit) which would allow me to avoid using process substitution. However, on the compute server, there is only gap version 4.10.0.