I’m trying to use xargs to evaluate a mathematical expression.
Like:
echo "1234" | xargs -I{} echo $(({}+1))
But, for whatever reason, {} is always evaluated as "0" (while I can confirm those are integer).
Any hint? Maybe something else than xargs for the job here?
Thanks everyone. The solution was to call sh -c with '$(())', the single quote is the important bit I was missing!