You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paste -d ' ' <(for _ in $(seq 1 "$(wc -l < "$intermediate_tmpfile")"); do echo "$myself"; done) "$intermediate_tmpfile" > "$mailmap_tmpfile"
<(…) (Process Substitution) is so-called bashism – it’s not specified by POSIX Shell Command Language and (as I know) the only shells that implements it is Bash and ZSH. ash, dash, ksh, … or any other POSIX-compatible shell does not implement this syntax.
This is the only problematic part, the rest of the script is POSIX-sh compliant.
The text was updated successfully, but these errors were encountered:
Thanks, @jirutka! I confess I'm relatively new to shell scripting and don't completely understand how the POSIX standard interacts with what different shells actually support. It looks like you're right that not every shell supports process substitution although I don't totally trust that Wikipedia feature table since on my Mac all of the shells that come installed (bash, zsh, ksh, and tcsh... /bin/sh is a clone of /bin/bash and /bin/csh is a clone of /bin/tcsh) seem to support this.
I'm happy to change this though (or accept a PR to change it if you want to take a crack at it). Am I correct that the best way to change this would be to use a temp file (basically alternative #1 in Wikipedia since the named pipe approach would require a scheme to generate random names for pipes so that two of these processes can be run concurrently? Or is there a better/easier approach?
No, it does not work in any other shells; due to:
git-self-blame:90:
<(…)
(Process Substitution) is so-called bashism – it’s not specified by POSIX Shell Command Language and (as I know) the only shells that implements it is Bash and ZSH. ash, dash, ksh, … or any other POSIX-compatible shell does not implement this syntax.This is the only problematic part, the rest of the script is POSIX-sh compliant.
The text was updated successfully, but these errors were encountered: