[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU Parallel Bug Reports Tcsh compatibility
From: |
parallel-bug |
Subject: |
GNU Parallel Bug Reports Tcsh compatibility |
Date: |
Thu, 13 Oct 2011 16:48:12 -0700 |
Hello Ole!
We are starting to use parallel in our lab, but we're getting error
messages because we use tcsh by default, and 'PARALLEL_PID=1234 \;
export PARALLEL_PID \; PARALLEL_SEQ=1 \; export PARALLEL_SEQ \;' (line
2904) is intended for bash.
Our first patch just did this:
my $parallel_env =
'setenv PARALLEL_SEQ $PARALLEL_SEQ\;'.
'setenv PARALLEL_PID $PARALLEL_PID\;'.
'PARALLEL_SEQ=$PARALLEL_SEQ\;export PARALLEL_SEQ\;'.
'PARALLEL_PID=$PARALLEL_PID\;export PARALLEL_PID\;';
It works, but now generates error messages in both shells.
I attempted to insert some variation of the following code:
[ -z "$tcsh" ] && export PARALLEL_PID=$PARALLEL_PID || setenv \
PARALLEL_PID $PARALLEL_PID
but getting it to work has escaped me, probably due to quoting issues
that I don't fully understand.
It then occurred to me that the best solution is to use the 'env'
command, like so:
env PARALLEL_PID=$PARALLEL_PID PARALLEL_SEQ=$PARALLEL_SEQ .....
since it'll work with any shell and needs less quoting than even the
original code!
I hope this helps you create an even more universal version of
parallel, a really cool tool!
--
P Fudd -- address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GNU Parallel Bug Reports Tcsh compatibility,
parallel-bug <=